Subject | Re: invalid insert: no columns |
---|---|
Author | eamonnm2002 <eamonnm2002@yahoo.co.uk> |
Post date | 2003-02-26T14:04:10Z |
--- In IBObjects@yahoogroups.com, Helen Borrie <helebor@t...> wrote:
table and everything worked as expected. Thanks v much.
cant remember why i started quoting everything - possibly because my
previous project has mixed case field names. what is the rule for
quoting? i know i have to quote field names that conflict with a
reserved word, not where wle it's needed.
thanks for the TIB_MonitorDialog tip, will keep that in mind.
FYI, the message i got didn't come fromthe server - it looked like
it was generated by IBO while it was bulding the field list for the
insert statement.
cheers.
> At 08:57 PM 25/02/2003 +0000, you wrote:couple
> >Hi,
> >
> >getting a weird error message when trying to insert using
> >TIBOQuery. The message is 'Invalid INSERT statement: No columns'.
> >
> >SQL is:
> >
> >select "PIN", "NAME"
> >from "FORMS"
> >where "PIN" = :PIN
> >
> >KeyLinks is set to "FORMS".PIN and the code is basicaly this:
> >
> >query.insert
> ><set fields>
> >query.post - error here
> >
> >i've used this approach before on my last project and it worked
> >well. the only difference this time is that this table has a
> >of BLOB fields, and i've just upgraded to firebird 1.0.2 from 1.0quoted
> >
> >any suggestions greatly appreciated!
>
> It looks as if you might be getting bitten somewhere by your
> identifiers. Your keylinks would need to be "FORMS"."PIN"TIB_MonitorDialog
>
> What's the code you are using for your <set fields>?
>
> As for what else might or might not be happening, drop a
> onto your form, call its Show method in your FormCreate, and watchwhat
> statement is going through to the API when Post is called on theInsert.
>YES! the fault was with my quoting - removed quotes from fields and
> Helen
table and everything worked as expected. Thanks v much.
cant remember why i started quoting everything - possibly because my
previous project has mixed case field names. what is the rule for
quoting? i know i have to quote field names that conflict with a
reserved word, not where wle it's needed.
thanks for the TIB_MonitorDialog tip, will keep that in mind.
FYI, the message i got didn't come fromthe server - it looked like
it was generated by IBO while it was bulding the field list for the
insert statement.
cheers.