fr21
fr21

Reputation: 1816

How to escape special characters in SQL strings from Delphi?

How to escape the special characters when executing an SQL query, when it is executed from Delphi using TADOQuery or TADOCommand etc..

For example the "scope operator".

Query looks like this.

GRANT CONTROL ON SCHEMA :: dbo TO supervisor

Thanks & Regards, Pavan.

Upvotes: 3

Views: 1810

Answers (1)

burnall
burnall

Reputation: 842

I do not work with Delphi for a while, so far I remember a few tricks:

  1. Set ParamCheck = False;
  2. Run queries with connection.Execute(SQL);

Upvotes: 5

Related Questions