Subject RE: [IBO] Absolute unique value/generator/SP problem
Author Kevin Stanton
Thanks Paul, GeneratorLinks is a bit too automatic for me as the field gets
initialized with a "temporary" order number (incase the user cancels the
order, don't want to use up an order nbr).

I didn't have a clue about the method qryOH.Gen_ID. This is great to know
and does make the code MUCH cleaner.
(I'm sure I missing some other good things in TIB_Query).

Thanks!
Kevin

-----Original Message-----
From: Paul Vinkenoog [mailto:paul@...]
Sent: Tuesday, June 22, 2004 6:35 AM
To: IBO List
Subject: Re: [IBO] Absolute unique value/generator/SP problem


Hi Kevin,

- If GeneratorLinks is too automatic for you, you can also get the
value like this (in GetPermOrderNo):

qryOH.FieldByName('OrderNo').AsString :=
qryOH.Gen_ID('GEN_ORDERNO', 1);

Still no need for qryGetID or sp_get_nextid.


Your code will become much cleaner like this. If you still get
duplicate values, the cause will be easier to track down. But you
shouldn't.


Greetings,
Paul Vinkenoog




___________________________________________________________________________
IB Objects - direct, complete, custom connectivity to Firebird or
InterBase
without the need for BDE, ODBC or any other layer.

___________________________________________________________________________
http://www.ibobjects.com - your IBO community resource for Tech Info
papers,
keyword-searchable FAQ, community code contributions and more !


Yahoo! Groups Sponsor
ADVERTISEMENT





----------------------------------------------------------------------------
--
Yahoo! Groups Links

a.. To visit your group on the web, go to:
http://groups.yahoo.com/group/IBObjects/

b.. To unsubscribe from this group, send an email to:
IBObjects-unsubscribe@yahoogroups.com

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



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