Problems in OleDb for Oracle

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
 
G

Guest

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!
***************************
 
S

sunny076

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top