Simple Insert
Posted: 10.02.2019, 10:17
Try to do this but it tells me that i have a synthax error so.
Values everythin is VarChar(100) except the Num, Avatar, genre that is Integer with range (10);
When i run this command in the mysql server everything run just fine so what i am doing wrong.
I user delphi community edition.
It is an FMX application.
Thank you.
Code: Select all
vQuery.Close;
vQuery.SQL.Clear;
vQuery.ParamCheck := False;
vQuery.SQL.Add
('INSERT INTO USER (NUM, NICKNAME, PASSWORD, EMAIL, IP_ADDRESS, NAME, SURNAME, AVATAR, ' +
'DATETIME_CREATED, LAST_DATETIME_VISIT, COUNTRY, COUNTRY_CODE, GENRE, SERVER_FOLDER) VALUES (' + User_Reg.Database_Num + ', ' +
User_Reg.Username + ', ' + User_Reg.Password + ', ' + User_Reg.Email + ', ' + User_Reg.IP + ', ' + User_Reg.Name + ', ' +
User_Reg.Surname + ', ' + User_Reg.Avatar + ', ' + User_Reg.DateTime_Created + ', ' +
User_Reg.DateTime_Created + ', ' + User_Reg.Country + ', ' + User_Reg.Country_Code + ', ' + User_Reg.Genre
+ User_Reg.Server_Folder + ')');
vQuery.ExecSQL;
When i run this command in the mysql server everything run just fine so what i am doing wrong.
I user delphi community edition.
It is an FMX application.
Thank you.