using System;
using Hitachi.HiRDB;
namespace test_C
{
class Sample
{
[STAThread]
static void Main(string[] args)
{
try
{
// Create a Connection object
HiRDBConnection cn = new HiRDBConnection("dsn=pc;"); ...1
// Connect to the database
cn.Open(); .............................................2
// Disconnect from the database
cn.Close(); ............................................3
}
catch (HiRDBException ex)
{
Console.WriteLine(ex);
}
catch (System.Exception ex)
{
Console.WriteLine(ex);
} ..........................................................4
}
}
} |