Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Row Buffering VS. Table Buffering

Status
Not open for further replies.

drosenkranz

Programmer
Sep 13, 2000
360
US
Need advice on the advatages/disadvantages on setting Row Buffering or Table Buffering for the tables in my dataenvironment. Any info appreciated? The early bird may get the occasional worm...
but the 2nd mouse always gets the cheese.
 
Use row buffering if you (meaning the user) will only change one row at a time before committing/rolling back. Use table buffering if you need the ability to commit/roll back changes to more than one row in a given table.

An example of when table buffering is appropriate: when adding line items for a sales order, where the user needs the ability to cancel the whole sales order.
Robert Bradley
 
I tend to use table buffering all the time even when the user is only updating one row. It is just too easy to programatically move off the record which will trigger an update in row mode. Using table buffering allows me more control over when the tableupdate actually gets done.
 
An easy way to think of it is the "1" side is Row Buffering and the "many" side is table. When you use row buffering you may want to ask the user to save changes before any record movement as MS does in its datachecker et all class in the gallery.
I'm still waiting for Robert to post a Buffering, TableUpdate|Revert, Begin|End Transaction, etc FAQ <s>. In fact it's probably already there I just missed it :eek: John Durbin
john@johndurbin.com
MCP Visual FoxPro
ICQ VFP ActiveList #73897253
 
Hi

Suppose I want to validate for the primary key, to ensure that when a user enters a key that's already available, the entry is rejected with an error message, the entry is then deleted and the user returns to the calling program, what should I do?

The following works fine with identifying the entry violation, but the PACK command fails, even when I SET EXCLUSIVE ON.

Code:
IF CURSORGETPROP(&quot;buffering&quot;) != 1
    MESSAGEBOX(&quot;Unique key violation.&quot;)
    SET EXCLUSIVE OFF
    Delete
    PACK
ENDIF
RETURN

On trying to PACK the table, I'm getting this error message:
&quot;Command cannot be issued on a table with cursors in table buffering mode.&quot;

How can I get rid of this?

Please help.

Abe.
 
Look up tablerevert in the manual (You do have a manual don't you).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top