Autor Beitrag
dakarli
Hält's aus hier
Beiträge: 1



BeitragVerfasst: Mo 26.11.07 14:20 
Hallo,

hoffe, dass die Frage eines Anfängers in dieses Forum passt!

Ich möchte durch eine mysql-Tabelle per buttom scrollen (previous - next) und nicht ein grid verwenden.
Die Anzahl der records kann ich auslesen:
$this->Label4->Caption = $this->tbtbl_survey1->RecNo;
Den letzten record der Tabelle wird auch ohne Probleme über die Angabe DataField und DataSource in ein edit-Feld eingelesen.
Naive lösung für den buttom next:
$this->tbtbl_survey1->Next();
wird bei click mit einer langen Fehlermeldung belohnt:
Application raised an exception class ADODB_Exception with message 'mysql error: [1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT 1' at line 1] in EXECUTE("SELECT * FROM tbl_survey WHERE LIMIT 1") usw usw.....

Kann mir jemand einen Tip geben?
Mit Dank
dakarli
Heiko
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3169
Erhaltene Danke: 11



BeitragVerfasst: Mo 26.11.07 18:06 
Hallo :welcome: ,

die Fehlermeldung ist schon korrekt ;).
ausblenden Quelltext
1:
EXECUTE("SELECT * FROM tbl_survey WHERE LIMIT 1")					

Entweder du lässt das WHERE weg, oder du musst eine Bedingung dahinter schreiben, ansonsten haut die SQL-Grammatik nicht hin ;).