Hi folks,

I've a dubt.

If I use a query with named parameters like this :

string query = "insert into test(name,age) values(:name,:age)"
where name is a varchar2 and age is a number(3), If I do this :

int age=29;
string name="Phil";

OracleCommand myComm = new OracleCommand(sql, myConn);
myComm.Parameters.Add("age", OracleDbType.Int32,ParameterDirection.Input);
myComm.Parameters.Add("name", OracleDbType.Varchar2, ParameterDirection.Input);
myComm.Parameters["age"].Value = age;
myComm.Parameters["name"].Value = name;
int rowsAffected = myComm.ExecuteNonQuery();
I get an error, because the order is wrong, and it tries to put the name in the number column.

So, is the order the only way to associate the data column ???

Thank you !!!

P.S. : Oracle 9i and ODP.Net