i use Delphi4 (Upd3) with SDAC-Components for MS-SQL.
By using the Query-Component i have this Error:
Im Projekt test.exe ist eine Exception der Klasse Exception aufgetreten. Meldung: 'Parser: The unknown symbol '' $01'. Prozeß wurde angehalten. Mit Einzelne Anweisung oder Start fortsetzen.
This is the Source
Code: Select all
with dmMain.msqFunktion do begin
SQL.Clear;
s := ' select max(bs_verlauf_id) as bs_verlauf_id ';
s := s + ' from bs_verlauf, bs_termine, bs_zeitraum ';
s := s + ' where bs_verlauf.bs_termine_id = bs_termine.bs_termine_id ';
s := s + ' and bs_termine.bs_zeitraum_id = bs_zeitraum.bs_zeitraum_id ';
s := s + ' and bs_verlauf.bibelschule_id = ' + BS_ID;
s := s + ' and bs_zeitraum.bs_zeitraum_id = ' + inttostr(RZ.zeitraum_id);
SQL.Add(s);
try
Execute; //HERE IT COMES TO THE ERROR (sometimes!!!)
except
end;
if not Eof then
Result := dmMain.msqFunktion.FieldByName( 'bs_verlauf_id' ).AsString;
Close;
end;
The Variable BS_ID is String and RZ.zeitraum_id is Integer with valid values.
The Problem ist, that the Error comes some times, but the most times the SQL-Script works fine.
Greetings
Karsten
ps: sorry about my english. My 2nd language is Pascal