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
Cowboy (Gregory A. Beamer) - MVP - 05 May 2005 16:21 GMT
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!
***************************
> Hi,
>
[quoted text clipped - 24 lines]
>
> Sunny
sunny076@yahoo.com - 05 May 2005 17:58 GMT
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