I have come across a problem when using the data access components to run a query from my program (compiled in Delphi 6) to a SQL Server 2000 database.
It doesn't seem to like speech marks.
If my program tries to input 'the "C:\LFM9_Update" folder.' into a VARCHAR field using an insert statement, an error occurs. But the above query will run using Microsoft Query Analyser.
Could you please tell me how I could insert the above text into a varchar field?
The driver doesn't seem to like speech marks
Use parameters instead of writing explicit parameter values in SQL statement:
Code: Select all
SQL.Text := 'insert into SM_MATTER_EVENTS (QQQ) values (:QQQ)';
Params[0].AsString := 'C:\LFM9_Update';
Execute;