Autor Beitrag
Josef-B
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 293

2003 Server, Win7, Win8
Delphi 2010 Pro, Firebird 2.5
BeitragVerfasst: Fr 11.07.03 21:43 
Was ist denn hier falsch? (abgesehen von den komischen Bezeichnungen :) ) Die Fehlermeldung ist SQL: unexpected end of command
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
ibdatasetPositionen.close;
ibdatasetPositionen.SelectSQL.Text :=
 'Insert into auftragspositionensped ' +
'(ID_AUFTRAGS_POSITION,AUFTRAGSNUMMER,POSITIONSNUMMER,LADE_NAME_1)' +
' Values (' + inttostr(id_auftragspos) + ', ' + inttostr(aufnummer) + ', '
            + inttostr(positionsnummer) + ', ' + '''dbedit6.text''' + ')';
ibdatasetpositionen.open;

Wenn ich anstelle '''dbedit6.text''' quotedstr(dbedit6.text) setze, hab ich die gleiche Fehlermeldung.

Die Datenbank ist Interbase.

Arbeitet Ihr auch am Wochenende?

Moderiert von user profile iconTino: Delphi-Tags hinzugefügt.


Zuletzt bearbeitet von Josef-B am Fr 11.07.03 22:05, insgesamt 1-mal bearbeitet
derDoc
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 623

Win Vista Prof
D2007 Prof
BeitragVerfasst: Fr 11.07.03 21:55 
Die Fehlermeldung sagt doch aus, dass das Ende der SQL Anweisung unerwartet war. Also will er was anderes haben.

Wie wäre ein ');'; am Ende der Anweisung?

Also:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
ibdatasetPositionen.Close; 
ibdatasetPositionen.SelectSQL.Text := 
'Insert INTO auftragspositionensped ' + 
'(ID_AUFTRAGS_POSITION,AUFTRAGSNUMMER,POSITIONSNUMMER,LADE_NAME_1)' + 
' VALUES (' + IntToStr(id_auftragspos) + ', ' + IntToStr(aufnummer) + ', ' 
            + IntToStr(positionsnummer) + ', ' + '''dbedit6.text''' + ');'; //hier ist die Änderung
ibdatasetpositionen.Open;

_________________
MfG derDoc
There are only 10 types of people: those who understand binary and those who don't.
Josef-B Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 293

2003 Server, Win7, Win8
Delphi 2010 Pro, Firebird 2.5
BeitragVerfasst: Fr 11.07.03 21:59 
Ne das wars leider nicht.

Immer noch die gleiche Fehlermeldung.
Josef-B Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 293

2003 Server, Win7, Win8
Delphi 2010 Pro, Firebird 2.5
BeitragVerfasst: Fr 11.07.03 22:04 
Sorry ich habs gefunden.

Es war gar nicht die Anweisung, sondern ein paar Zeilen weiter kommt noch ne Select-Anweisung, die hatte einen Fehler.

Die SQL-Anweisung oben funktioniert.

Nochmals Entschuldigung.

Danke Josef