Problems in OleDb for Oracle

  • Thread starter Thread starter sunny076
  • Start date Start date
S

sunny076

Hi,

I am using the same code below for ADO.NET and MS OLEDB provider for
Oracle but in OLEDB, I get the error "ORA-01008: Not all variables
bound". I don't have a clue what was wrong. IN ADO.Net I can inser,
update and delete but I can't with OLEDB.


myConnection = new OracleConnection("user id=system;"+
"data source=ORATEST.SOFTWARE-LABS.NET;password=test");

myConnection.Open();

String updateCmd = "INSERT INTO Authors (au_id,au_lname) VALUES (:Id,
:LName);

SqlCommand myCommand = new SqlCommand(updateCmd, myConnection);

myCommand.Parameters.Add(new SqlParameter(":Id",
SqlDbType.VarChar));

myCommand.Parameters.Add(new SqlParameter(":LName",
SqlDbType.VarChar));

myCommand.ExecuteNonQuery();

Thanks in advance,

Sunny
 
Ponder this for the answer:
Where are you accutally putting values into the parameters you created?


---

Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
 
In my Code, I declare the parameter in directly. In the project I am
working on, we have mapped columns from source and destnation table.

Sunny
 
Back
Top