Subject | Re: [IBO] Re: TIB_Query Programatically Defined SQL with Strings |
---|---|
Author | Paul Vinkenoog |
Post date | 2003-12-08T23:35:18Z |
Hello Jack,
don't double-quote the names when you define them, they are case-
insensitive.
on either side will result in one single quote on either side in the
SQL statement - exactly what you need.
inspect or watch MyDSQL.SQL.Text after you'd set it?
If it doesn't work out, please post _exactly_ what's in your source
code and _exactly_ what you see in the Monitor.
Good night!
Paul Vinkenoog
> I have set up my tables and fields with upper case to allow me toAs Helen explained, you don't have to use upper case. As long as you
> ignore case in my queries.
don't double-quote the names when you define them, they are case-
insensitive.
> Here is what I think I didUmm.... *think* you did? What happened to your source code? ;-)
> With MyDSQL do beginThis is correct. Surrounding ABC Company, Inc. with two single quotes
> SQL.Clear;
> SQL.Add('UPDATE MyTable SET MyField = ''ABC Company, Inc.''
> WHERE ID = 1');
on either side will result in one single quote on either side in the
SQL statement - exactly what you need.
> Execute;I always do a Prepare first, but maybe that's not necessary.
> End;Not the server. Did you step through your code in the debugger and
> When I opened an SQLMonitor to see what the server had received, it
> was something like this:
> UPDATE MyTable SET MyField = "'ABC Company, Inc.'".
>
> The component or the server added the double quotes but in this
inspect or watch MyDSQL.SQL.Text after you'd set it?
If it doesn't work out, please post _exactly_ what's in your source
code and _exactly_ what you see in the Monitor.
Good night!
Paul Vinkenoog