Answer the question
In order to leave comments, you need to log in
How to add data to an Access database?
I'm trying to add a new user to the database in the following way:
DataModule2.ADOQuery1.SQL.Add('INSERT INTO Users (login,password) VALUES ('''+Edit1.Text+''', '''+Edit2.Text+''')');
DataModule2.ADOQuery1.ExecSQL;
ShowMessage('Успешно');
Answer the question
In order to leave comments, you need to log in
Good. Well, there's nothing to think about. Actually a syntax error, most likely with '
Take this all 'INSERT INTO Users (login,password) VALUES ('''+Edit1.Text+''', '''+Edit2.Text+''')');
DataModule2.ADOQuery1.ExecSQL;
Drive it into a text variable along with the data, you'll see for yourself. If you don't see it, display it in Management Studio
Can count first:
now the error is "syntax error of insert into statement"Check the query text (SQL.Text) either with a debugger or ShowMessage.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question