Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Data Buffering Problem
Message
From
18/10/2006 13:06:05
 
 
To
18/10/2006 12:10:54
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01162983
Message ID:
01163004
Views:
11
>Hi, thanks for the response.
>I first tried SQL Update and then tried xbase Replace and got the same result. I don't think the record pointer is being moved...
USE <table> ORDER <order tag>
SET MULTILOCKS ON
CURSORSETPROP("Buffering", 3, <table>)

*** Find your record
*** SEEK, locate or however, then do rest

lnRec = RECNO()
? 'Record: ' + TRANSFORM(RECNO())
? 'Value: ' + <table.field>
? 'Now Updating'
*** No Where clause will update all records, moving record pointer
UPDATE <table> SET <field> = <value> ;
   WHERE <filter condition>

*** Check record pointer
? 'Record: ' + TRANSFORM(RECNO())

*** Go to original record, check value
GO lnRec
? 'Value: ' + <table.field>

*** Revert information
TABLEREVERT(.T.)

*** Check value again
? 'Value: ' + <table.field>

*** Change record second time
UPDATE <table> SET <field> = <value> ;
   WHERE <filter condition>

*** Check record pointer
? 'Record: ' + TRANSFORM(RECNO())

*** Go to original record, check value
GO lnRec
? 'Value: ' + <table.field>

*** Revert information
TABLEUPDATE(.T.)

*** Check value again
? 'Value: ' + <table.field>
Duty is ours, the results are God's - John Quincy Adams
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform