Subject | RE: [IBO] Cursors |
---|---|
Author | Malcolm Smith |
Post date | 2002-09-09T13:04:49Z |
I tried only preparing once but got an exception - I had to close and
re-open (via Prepare)
I also wrote I was gathering data for an in-memory structure - I'm only
collecting data, not updating records.
Malcolm Smith
MJ Freelancing
http://www.mjfreelancing.com
C++Builder Software Protection
-----Original Message-----
From: Svein Erling Tysvaer
[mailto:svein.erling.tysvaer@...]
Sent: Monday, 9 September 2002 23:11
To: IBObjects@yahoogroups.com
Subject: Re: [IBO] Cursors
Hi Malcolm,
each iteration, but best of all would be to just do it all in one go:
UPDATE <DBSpriteDetail>
SET <IPAddress> = (SELECT IPL_IPADDRESS FROM IPLOOKUP WHERE IPLOOKUP.ID =
<DBSpriteDetail.IPLookupID>),
<Local> = (SELECT IPL_LOCAL FROM IPLOOKUP WHERE IPLOOKUP.ID =
<DBSpriteDetail.IPLookupID>)
WHERE EXISTS (SELECT 1 FROM IPLOOKUP WHERE IPLOOKUP.ID =
<DBSpriteDetail.IPLookupID>)
and please make sure you do it on a test database first, 'cause I don't
want any blame if I wrote something wrong here.
HTH,
Set
___________________________________________________________________________
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 !
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
re-open (via Prepare)
I also wrote I was gathering data for an in-memory structure - I'm only
collecting data, not updating records.
Malcolm Smith
MJ Freelancing
http://www.mjfreelancing.com
C++Builder Software Protection
-----Original Message-----
From: Svein Erling Tysvaer
[mailto:svein.erling.tysvaer@...]
Sent: Monday, 9 September 2002 23:11
To: IBObjects@yahoogroups.com
Subject: Re: [IBO] Cursors
Hi Malcolm,
>My question is whether this is the most efficient method (required toNo, it isn't. You could save quite a bit if you just skipped preparing for
>prepare/close on each iteration).
each iteration, but best of all would be to just do it all in one go:
UPDATE <DBSpriteDetail>
SET <IPAddress> = (SELECT IPL_IPADDRESS FROM IPLOOKUP WHERE IPLOOKUP.ID =
<DBSpriteDetail.IPLookupID>),
<Local> = (SELECT IPL_LOCAL FROM IPLOOKUP WHERE IPLOOKUP.ID =
<DBSpriteDetail.IPLookupID>)
WHERE EXISTS (SELECT 1 FROM IPLOOKUP WHERE IPLOOKUP.ID =
<DBSpriteDetail.IPLookupID>)
and please make sure you do it on a test database first, 'cause I don't
want any blame if I wrote something wrong here.
HTH,
Set
___________________________________________________________________________
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 !
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/