Subject | Re: TIB_Query Programatically Defined SQL with Strings |
---|---|
Author | Marco Menardi |
Post date | 2003-12-08T22:20:35Z |
--- In IBObjects@yahoogroups.com, "jrodenhi" <jack@r...> wrote:
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
> I have been having problems with an update statement I am building inmmm I don't know if I've understood your problem.
> Delphi that looks something like:
>
> UPDATE MyTable SET MyField = 'ABC Company, Inc.'
>
> I get an error that indicates that the parser believes I want to set
> MyField equal to another column as though 'ABC Company, Inc.' is the
> name of a column.
>
> I can see that the customary way of accomplishing what I want to do
> is to use a parameterized query. I may end up doing it that way,
> but for now, am I missing something obvious?
>
> Thank you for your help.
>
> -Jack Rodenhi
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