I am using Insight.Database for Oracle. I am trying to get an insert statement to work but keeps failing with an "ORA-00936: missing expression" exception. Here is the code I am trying to execute:
var myQuery =
@"insert into MySchema.MyTable (Field1, Field2, Field3)" +
" values (@Value1, @Value2, @Value3)";
var myParameters = new { Value1 = 12345, Value2 = 67890, Value3 = "MyFileName" };
var myResult = db.ExecuteSql(myQuery, myParameters);
Please can someone help me in this regard? THanks in advance.
You have to use :
for bind variables
var myQuery =
@"insert into MySchema.MyTable (Field1, Field2, Field3)" +
" values (:Value1, :Value2, :Value3)";
var myParameters = new { Value1 = 12345, Value2 = 67890, Value3 = "MyFileName" };