G
Guest
I have been trying to retrieve data from Oracle Data base server 8.0.6.0.0 using Oracle Data Provider.
I can't use stored procedure...so I used prepare method of OracleCommand class to make execution plan at server.
but oracle database returned error code "ora-00936".
what's wrong at this code..?
string strConOra = @"Data Source=datasource;User ID= userid; Password=pwd";
OracleConnection objCon = new OracleConnection(strConOra);
objCon.Open();
string strcmd = "select * from test where test_ID = @str ";
OracleCommand objCom = new OracleCommand(strcmd, objCon);
objCom.CommandText = strcmd;
objCom.Parameters.Add("@str", "ddd");
objCom.Prepare();
OracleDataReader rd = objCom.ExecuteReader();
Thanks in advance .
I can't use stored procedure...so I used prepare method of OracleCommand class to make execution plan at server.
but oracle database returned error code "ora-00936".
what's wrong at this code..?
string strConOra = @"Data Source=datasource;User ID= userid; Password=pwd";
OracleConnection objCon = new OracleConnection(strConOra);
objCon.Open();
string strcmd = "select * from test where test_ID = @str ";
OracleCommand objCom = new OracleCommand(strcmd, objCon);
objCom.CommandText = strcmd;
objCom.Parameters.Add("@str", "ddd");
objCom.Prepare();
OracleDataReader rd = objCom.ExecuteReader();
Thanks in advance .