[b][red]This message was edited by rnojoe23 at 2006-9-12 11:56:53[/red][/b][hr]
I am running a script that inserts records into a SQL 2000 database. I am getting a syntax error and the record fails to make it into the database. I would like to be able to see the whole sql statement so I can determine why its not getting written to the database.
my question is. how do I write a big long sql statement to the log file so I can see it.
here is some of my code
Writeln(mfilLog,'Starting import of records');
stlSql.Add(INSERT INTO TableA VALUES;
If StrRet <> '' then
Writeln(mfilLog,'Unable to insert Record:'+
The log file reads
Unable to insert Record:12345/AB
[Microsoft][ODBC SQL Server Driver][SQL Server} Line 2: Incorrect syntax near ",".
I tried to add Writeln(mfilLog,' '+stlSql); but that would not compile giving me a "main.pas(785): Incompatible types: 'String' and 'TStringList'. error
Can anyone help me write the stlSql statement to the log file so I can see the exact record that the script is trying to insert into the database
I am running Delphi Version 3
Thank you very much