Subject [IBO] Re: TIB_Query Programatically Defined SQL with Strings
Author jrodenhi
Thank you, Paul. I say "think" because I work in VB/SQL Server here
at work. I am trying to get my project going in Delphi/Firebird at
home.

I will do a Prepare first, put a watch on the Text property and see if
I can determine where the change originates. I will update you
tomorrrow.

-Jack


--- In IBObjects@yahoogroups.com, Paul Vinkenoog <paul@v...> wrote:
> Hello Jack,
>
> > I have set up my tables and fields with upper case to allow me to
> > ignore case in my queries.
>
> As Helen explained, you don't have to use upper case. As long as you
> don't double-quote the names when you define them, they are case-
> insensitive.
>
> > Here is what I think I did
>
> Umm.... *think* you did? What happened to your source code? ;-)
>
> > With MyDSQL do begin
> > SQL.Clear;
> > SQL.Add('UPDATE MyTable SET MyField = ''ABC Company, Inc.''
> > WHERE ID = 1');
>
> This is correct. Surrounding ABC Company, Inc. with two single
quotes
> 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;
>
> > 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
>
> Not the server. Did you step through your code in the debugger and
> 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