Could someone tell me what is wrong with this code?
Using SQLite3
on button click:
try
//SQLQueryUsrRegister.Close;
//SQLQueryUsrRegister.SQL.Clear;
SQLQueryUsrRegister.Open;
SQLTransUsrRegister.Action := caCommit;
//SQLTransUsrRegister.Active := True;
SQLQueryUsrRegister.SQL.Add('INSERT INTO UserAccounts (UsrName, UsrPass, UsrEmail)VALUES(:USERNAME, :USERPASSWORD, :USEREMAIL)');
SQLQueryUsrRegister.Params.ParamByName('USERNAME').AsString := txtUsername.Text;
SQLQueryUsrRegister.Params.ParamByName('USERPASSWORD').AsString := txtPassword.Text;
SQLQueryUsrRegister.Params.ParamByName('USEREMAIL').AsString := txtEmail.Text;
SQLQueryUsrRegister.ExecSQL;
//SQLQueryUsrRegister.Active := True;
//SQLQueryUsrRegister.Insert;
//SQLQueryUsrRegister.ApplyUpdates;
SQLiteUsrRegister.Transaction.CommitRetaining;
//SQLQueryUsrRegister.Transaction.ExecuteAction();
SQLTransUsrRegister.Commit;
on formCreate:
SQLiteUsrRegister.Connected := False;
SQLiteUsrRegister.DatabaseName := SysUtils.ExtractFilePath(ParamStr(0)) + 'sqlite.db';
SQLiteUsrRegister.Connected := True;
if SQLiteUsrRegister.Transaction.Active = False
then SQLiteUsrRegister.Transaction.StartTransaction;
I've been searching and tested other stuff but none helped, also tested with the commented lines.
Thank you