I'm a VB6 programmer trying to get a handle on .NET and I'm really hoping someone can point me in the right direction.
My insert sql statement is as follows:
The add new row statement appears to work okay but when I try add data to the row I receive the following error message: "Syntax error in INSERT INTO statement".
At first, I thought there might be a typo in the statement so I copied the field names directly from the table into my code.
Then, I checked the net for the error code. There were a few entries and they all said that I needed to add a value for every field but my code is already doing that.
Then, I checked the details of the error message and found the following: "In order to evaluate an indexed property, the property must be qualified and the arguments must be explicitly supplied by the user.". I checked the table but there are no indexed fields in the table.
Please help. I'm out of ideas as to where to look next.
My insert sql statement is as follows:
VB.NET:
sql = "INSERT INTO tblMTDadjust (Lend, ManagerAcid, AssocAcid, Month, " & _
"Day, Hour, Minute, Region, Unit, Activity, Symbol, AdjHour, " & _
"AdjMinute, AdjustedDate, EnteredDate, RunningProgram) " & _
"VALUES(@lend, @mgracid, @acid, @month, @da, @hr, @min, " & _
"@region, @unit, @activity, @symbol, @adjhr, @adjmin, @adjdate, " & _
"@entereddate, @procnum)"
The add new row statement appears to work okay but when I try add data to the row I receive the following error message: "Syntax error in INSERT INTO statement".
At first, I thought there might be a typo in the statement so I copied the field names directly from the table into my code.
Then, I checked the net for the error code. There were a few entries and they all said that I needed to add a value for every field but my code is already doing that.
Then, I checked the details of the error message and found the following: "In order to evaluate an indexed property, the property must be qualified and the arguments must be explicitly supplied by the user.". I checked the table but there are no indexed fields in the table.
Please help. I'm out of ideas as to where to look next.