using(OracleConnection Con = new OracleConnection("Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.20)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=ora9i.com)));User Id=123;Password=123;"))
{
OracleCommand CmdObj = new OracleCommand(OraCmd, Con);
OracleDataAdapter dataAdapter = new OracleDataAdapter(OraCmd, Con);
DataSet ds = new DataSet();
dataAdapter.Fill(ds);
}
或
OracleConnection con = new OracleConnection("Data Source=AA;Persist Security Info=True;User ID=123;Password=123;Unicode=True");