Subject | Re: TIB_Query Programatically Defined SQL with Strings |
---|---|
Author | jrodenhi |
Post date | 2003-12-08T22:36:36Z |
Marco,
Thank you for responding so fast. I have set up my tables and fields
with upper case to allow me to ignore case in my queries. I used the
IB_DSQL component and got errors that I think were the same as the
IB_Query.
Here is what I think I did
With MyDSQL do begin
SQL.Clear;
SQL.Add('UPDATE MyTable SET MyField = ''ABC Company, Inc.'' WHERE
ID = 1');
Execute;
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 case,
it was not helpful. I am using Firebird 1.5.
Any ideas?
Thanks again.
-Jack
Thank you for responding so fast. I have set up my tables and fields
with upper case to allow me to ignore case in my queries. I used the
IB_DSQL component and got errors that I think were the same as the
IB_Query.
Here is what I think I did
With MyDSQL do begin
SQL.Clear;
SQL.Add('UPDATE MyTable SET MyField = ''ABC Company, Inc.'' WHERE
ID = 1');
Execute;
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 case,
it was not helpful. I am using Firebird 1.5.
Any ideas?
Thanks again.
-Jack
--- In IBObjects@yahoogroups.com, "Marco Menardi" <mmenaz@l...> wrote:
>
> mmm I don't know if I've understood your problem.
> Use IB_DSQL and .execute method if you just want to issue update
> statements to the database, IB_Query is for selecting datasets.
> Use UPPER CASE for your table and field name, in your database
> definition, otherwise you have to enclose into double quotes at the
> client side (i.e. update "MyTable" set "MyField" = 'ABC company')
> Hope this will solve.
> regards
> Marco Menardi