Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread SQL and concatenation
Tue, Dec 30 2008 7:33 AMPermanent Link

Thor
I concatenate 2 fields OK by running this sql in Database system Utility.
SELECT ..... C.PostNrll''llC.PostStad AS PAdresse INTO "C: .... " FROM ...

When I wrap that sql into Delphi code, like Query.SQL.Add('....'), I can compile OK.
Running the app however causes
11949 Error- missing single quote after 'llC.Poststad INTO ""
....

What is the solution here? (D7 and DBISAM 3.26)
Thor
Tue, Dec 30 2008 7:50 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Thor


I always use QuotedStr to make sure of the right number of quotes.

Roy Lambert
Tue, Dec 30 2008 9:29 AMPermanent Link

Thor
Roy Lambert <roy.lambert@skynet.co.uk> wrote:

Thor

I always use QuotedStr to make sure of the right number of quotes.

Roy Lambert
****
Hello again Roy!
I am not familiar with QuotedStr, - and googling made me no viser.
May I ask how?
Thor
Tue, Dec 30 2008 11:15 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Thor

No need to google - its part of the standard Delphi functions - from D2006's OLH

Use QuotedStr to convert the string S to a quoted string. A single quote character (') is inserted at the beginning and end of S, and each single quote character in the string is repeated.


Roy Lambert [Team Elevate]
Image