R
Ross
Hello,
I would like to execute an Oracle anonymous block using the following
code. The code works just fine with a regular Insert/Update/Select
commands, but with even a very simple anonymous block the
DataAdapter.Fill() method will hang. No error is returned.
StringBuilder sbQuery = new StringBuilder();
sbQuery.Append("DECLARE myID NUMBER; BEGIN INSERT INTO
doc_pkg(doc_pkg_id) VALUES(doc_pkg_id_seq.nextval) RETURNING
doc_pkg_id INTO myID; END; ");
OleDbConnection dbcConn = new
OleDbConnection("Provider=OraOLEDB.Oracle;Data Source=mydb;User
Id=user;Password=psw");
OleDbCommand myCommand = new OleDbCommand(sbQuery.ToString(),
dbcConn);
OleDbDataAdapter myDataAdapter = new OleDbDataAdapter(myCommand);
dbcConn.Open();
myDataSet = new DataSet();
myDataAdapter.Fill(myDataSet,"Results");
dbcConn.Close();
I have also tried Provider=MSDAORA in teh connection string, but the
results were no different.
Any ideas would be appreciated.
I would like to execute an Oracle anonymous block using the following
code. The code works just fine with a regular Insert/Update/Select
commands, but with even a very simple anonymous block the
DataAdapter.Fill() method will hang. No error is returned.
StringBuilder sbQuery = new StringBuilder();
sbQuery.Append("DECLARE myID NUMBER; BEGIN INSERT INTO
doc_pkg(doc_pkg_id) VALUES(doc_pkg_id_seq.nextval) RETURNING
doc_pkg_id INTO myID; END; ");
OleDbConnection dbcConn = new
OleDbConnection("Provider=OraOLEDB.Oracle;Data Source=mydb;User
Id=user;Password=psw");
OleDbCommand myCommand = new OleDbCommand(sbQuery.ToString(),
dbcConn);
OleDbDataAdapter myDataAdapter = new OleDbDataAdapter(myCommand);
dbcConn.Open();
myDataSet = new DataSet();
myDataAdapter.Fill(myDataSet,"Results");
dbcConn.Close();
I have also tried Provider=MSDAORA in teh connection string, but the
results were no different.
Any ideas would be appreciated.