1

I am facing same problem as this one.only problem is that i am having the fields as follows

Field Name     Data
-------------------
ID             AutoNumber
username       Text
password       Text

now I don't know if any of the word username,password is keyword in ODBC.
I googled for it and many anwsers says the none of it is keyword in ODBC.
I am using ms access.
Can anyone help me?

5
  • this one link faced more problem. So, can you tell your problem one by one. Commented Apr 18, 2014 at 5:05
  • @UdanPirappu when i try to execute insert into Users values(1,'nikhil','mehta') it works fine form C#.but insert into Users(username,password) values('nikhil','mehta') gives syntax error in insert into statement and it works fine in ms access Commented Apr 18, 2014 at 5:09
  • But, In SQLite your code worked. In SQLite, I set some option for ID Field such as NOT NULL, PRIMARY KEY, AUTOINCREMENT, UNIQUE, DEFAULT 1. Likewise, may be you put some option for your ID field. Commented Apr 18, 2014 at 5:28
  • @UdanPirappu i have tried may ways to do it but gives same error.Can you tell me if there any issue while accessing ms acces databse outside of ms access i.e. programatically. Commented Apr 18, 2014 at 5:33
  • Try my answer!...May be you'll get answer... Commented Apr 18, 2014 at 6:31

1 Answer 1

1

Password is a reserved word. Bracket that field name to avoid confusing the db engine.

Insert into Users (Username, [Password]) values ('nikhil','mehta');

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.