Subject Re: [IBO] Probably a stupid question
Author Robert martin
Thanks Helen

I assume that works. I think the problem was that my Keylinks.add was before assigning the SQL. I already had a prepare (sorry I should have shown that).

I have just loaded it manually for now and all seems fine..

i.e. UpdateQuery.ParambyName('WorkRef').AsFloat := UpdateQuery.GeneratorValue('WORKFILES_GEN', 1);

Thanks for all those who supplied. I will keep it in mind for next time :)

Rob Martin
Software Engineer

phone +64 03 377 0495
fax +64 03 377 0496
Wild Software Ltd
----- Original Message -----
From: Helen Borrie
Sent: Tuesday, December 14, 2004 3:46 PM
Subject: Re: [IBO] Probably a stupid question

At 02:08 PM 14/12/2004 +1300, you wrote:

>Hi All
>This is probably a stupid question but. I have the following SQL that fails
>on execute with a primary key violation. Code snip follows.....
>UpdateQuery.SQL.Text := 'INSERT INTO WorkGlTrans ' +
>TRANSDATE,.......) ' +
>:CONTROLREF, :TRANSDATE, .......); ';

Prepare; // !!!!!!! Otherwise IBO doesn't know about the metadata.

>// Set params (except workref)
>WorkRef is the PK for this table. UpdateQuery is an instance of an IBOQuery
>that is created in code.
>I have persistant IBOQuerys that have similar SQL and settings, they run
>fine. What have I missed here?
>Confused and feeling stupid :)
>Rob Martin
>Software Engineer

IB Objects - direct, complete, custom connectivity to Firebird or InterBase
without the need for BDE, ODBC or any other layer.
___________________________________________________________________________ - your IBO community resource for Tech Info papers,
keyword-searchable FAQ, community code contributions and more !

Yahoo! Groups Sponsor

Yahoo! Groups Links

a.. To visit your group on the web, go to:

b.. To unsubscribe from this group, send an email to:

c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

[Non-text portions of this message have been removed]