C
Chuck Salvo
I'm connected to Sybase ASA version 8.02
Trying to execute the following command:
myCommand.Connection = OleDbConnection1
myCommand.Transaction = myTrans
cmd = "INSERT INTO mvr_viol
(servicekey,source,info,viol,conv,description,code,points,acd,avd,disposition)"
cmd = cmd & " VALUES (?,1,?,?,?,?,?,?,?,?,?)"
myCommand.CommandText = cmd
I create the 10 parameters, fill them with data, and the
ExecuteNonQuery works fine.
However, is some cases I need one of the columns set to "NULL"
so in that case there is this snippet:
myCommand.Parameters(3).IsNullable = True
myCommand.Parameters(3).Value = DBNull.Value
However, this time the ExecuteNonQuery fails with the message:
"Count field incorrect: Not enough values for host variables"
There are still 10 parameters, yet it fails. Can this be made to work?
Trying to execute the following command:
myCommand.Connection = OleDbConnection1
myCommand.Transaction = myTrans
cmd = "INSERT INTO mvr_viol
(servicekey,source,info,viol,conv,description,code,points,acd,avd,disposition)"
cmd = cmd & " VALUES (?,1,?,?,?,?,?,?,?,?,?)"
myCommand.CommandText = cmd
I create the 10 parameters, fill them with data, and the
ExecuteNonQuery works fine.
However, is some cases I need one of the columns set to "NULL"
so in that case there is this snippet:
myCommand.Parameters(3).IsNullable = True
myCommand.Parameters(3).Value = DBNull.Value
However, this time the ExecuteNonQuery fails with the message:
"Count field incorrect: Not enough values for host variables"
There are still 10 parameters, yet it fails. Can this be made to work?