Jump to content
Xtreme .Net Talk

cfirex

Members
  • Posts

    1
  • Joined

  • Last visited

About cfirex

  • Birthday 07/20/1978

cfirex's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. 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 ??? :eek: Thank you :) P.S. : Oracle 9i and ODP.Net
×
×
  • Create New...