Subject | Re: [IBO] For UPDATE clause? |
---|---|
Author | Jason Wharton |
Post date | 2002-12-09T16:55:26Z |
This is how you tell InterBase to maintain a live cursor such that it will
increment a pointer on the server one record at a time instead of batching
records together into packets for efficiency. Because the server is
maintaining a record pointer to the row just fetched it gives you the
opportunity to perform an update statement like this:
UPDATE atable
SET acol = aval
WHERE CURRENT OF acursorname
This eliminates the need to have a searched record but instead it goes
immediately and directly to the current record pointer and performs the
update.
Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com
-- We may not have it all together --
-- But together we have it all --
increment a pointer on the server one record at a time instead of batching
records together into packets for efficiency. Because the server is
maintaining a record pointer to the row just fetched it gives you the
opportunity to perform an update statement like this:
UPDATE atable
SET acol = aval
WHERE CURRENT OF acursorname
This eliminates the need to have a searched record but instead it goes
immediately and directly to the current record pointer and performs the
update.
Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com
-- We may not have it all together --
-- But together we have it all --
----- Original Message -----
From: "Alan McDonald" <alan@...>
To: <IBObjects@yahoogroups.com>
Sent: Sunday, December 08, 2002 4:59 AM
Subject: [IBO] For UPDATE clause?
> I see occasionally the clause "FOR UPDATE" in the SQL box. Must ahve
missed
> reading the explanation for it. Can someone enlighten me?
> Alan