oracle.manageddataaccess.client example
Example: c# Oracle.ManagedDataAccess.dll select
using System;
using Oracle.ManagedDataAccess.Client;
using Oracle.ManagedDataAccess.Types;
namespace Connect
{
class Program
{
static void Main(string[] args)
{
try
{
string constr = "user id=scott;password=tiger;data source=oracle";
OracleConnection con = new OracleConnection(constr);
con.Open();
Console.WriteLine("Connected to Oracle Database {0}", con.ServerVersion);
con.Dispose();
Console.WriteLine("Press RETURN to exit.");
Console.ReadLine();
}
catch (Exception ex)
{
Console.WriteLine("Error : {0}", ex);
}
}
}
}