Problem with edit and post
Posted: 24.03.2007, 12:41
Hallo!
I have a big problem with the .edit and .post procedure.
The following programcode
Zquery1.SQL.Add('Select lastlogin from Benutzer where `Benutzername` = BINARY'''+AnsiToUTF8(konfig.benutzername)+''';')
If NOT form1.Zquery1.eof then
BEGIN
form1.ZQuery1.edit;
form1.Zquery1.FieldValues['lastlogin']:=Datum;
lastlogin:=datum;
form1.ZQuery1.post;
END;
becomes this sql code (i've logged it):
070324 12:23:01 170 Query Select lastlogin from Benutzer where `Benutzername` = BINARY'ScampiKutter'
170 Query UPDATE `GildenIdent Daten`.Benutzer SET lastlogin='2007-03-24 12:23:00' WHERE lastlogin='2007-03-24 12:21:34'
Now it changes more then one line.... t think the statemant should be something line .....'WHERE `PRIMARY`=xyz'
I use the newest Components but i tried it also with some older.....
Bye Sven!
I have a big problem with the .edit and .post procedure.
The following programcode
Zquery1.SQL.Add('Select lastlogin from Benutzer where `Benutzername` = BINARY'''+AnsiToUTF8(konfig.benutzername)+''';')
If NOT form1.Zquery1.eof then
BEGIN
form1.ZQuery1.edit;
form1.Zquery1.FieldValues['lastlogin']:=Datum;
lastlogin:=datum;
form1.ZQuery1.post;
END;
becomes this sql code (i've logged it):
070324 12:23:01 170 Query Select lastlogin from Benutzer where `Benutzername` = BINARY'ScampiKutter'
170 Query UPDATE `GildenIdent Daten`.Benutzer SET lastlogin='2007-03-24 12:23:00' WHERE lastlogin='2007-03-24 12:21:34'
Now it changes more then one line.... t think the statemant should be something line .....'WHERE `PRIMARY`=xyz'
I use the newest Components but i tried it also with some older.....
Bye Sven!