On the first look... You have to add a
'
character around the string values.
INSERT INTO login ([login], [password])
VALUES('stringValue','stringValue')
In case of numeric values, you have to use this:
INSERT INTO login ([NumericField1], [NumericField2])
VALUES(22,0)
In case of datetime values, you have to use this:
INSERT INTO login ([DateTimeField1], [DateTimeField2])
VALUES(#MM/dd/yyyy#,#MM/dd/yyyy#)
Finally, i suggest to use
queries with named parameters[
^]:
PARAMETERS [slogin] CHAR, [sPasswd] CHAR;
INSERT INTO [login] ([login],[password])
VALUES([slogin], sPassword)
Using parameters[
^] is very good practice. You can add it via
OleDbParameterCollection.AddWithValue Method[
^]
Finally, i need to warn you: DO NOT use
reserverd words[
^]! It might be the reason of several troubles.
Cheers!