using System;
using System.Data.OracleClient;
using System.Data.OleDb;
using System.Data.Odbc;
class Program
{
static void Main(string[] args)
{
string odbcConnectString = "Driver={Oracle in OraDb10g_home1};Server=ORCL;uid=hr;pwd=password;";
using (OdbcConnection connection = new OdbcConnection(odbcConnectString))
{
connection.Open( );
Console.WriteLine("ConnectionString = {0}\n", odbcConnectString);
Console.WriteLine("State = {0}", connection.State);
Console.WriteLine("DataSource = {0}", connection.DataSource);
Console.WriteLine("ServerVersion = {0}", connection.ServerVersion);
}
}
}
|