|
Hey Guys, I`m having that agonizing error when trying to add a new record to the DB (vb.net, db = access). I used both the generated Insert Command and made a new command - I get that exception in both cases.
Here`s the code of the auto-generated insert command:
---------
INSERT INTO Appointments(AppointmentID, BarberName, CustomerName, Day, Duration, Haircut, Hour, Minute, Month, SpecificBarber) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
-------------
When I created my own command, instead of the question marks, I the actual variables needed (with & before and after..).
When debugging - I see the new row that`s added to the dataset (just before I try to update the dataset into the DB) - has all the correct values.
Please help me.
|
|
|
One thing I forgot to add: AppointmentID is an auto-incremented number.
I add a number in the row I`m trying to add.
(if this has any influence)...
|
|
|
uh ooops
Sorry, just checked to be sure. it seems AppointmentID is NOT an auto number. it`s a regular int. Still getting the error though
|
|
|
Problem solved
It appears Day, Month, Hour, Minute etc are reserved words in Access, so I couldnt update those fields...
|
|
|
|
|