Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can I use INSERT-SQL in multiuser
Message
From
21/07/2006 00:36:04
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
21/07/2006 00:27:43
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01137935
Message ID:
01138298
Views:
10
>I appreciate your help.

Well, the following would be some sample code, similar to real code I write.
* Open tables, and enable buffering
select 0
use Table1
CursorSetProp("Buffering", 5)
select 0
use Table2
CursorSetProp("Buffering", 5)
* (Repeat for other tables where you might do changes)

begin transaction

* (do some changes in Table1, and then:)
local llSuccess
llSuccess = TableUpdate()
if not llSuccess
  * Show information about the error
  local laMyError
  aerror(laMyError)
  MessageBox("Error saving Table1, error #" + trans(laMyError(1));
    + laMyError(2)) && Shows error number and error message
endif

if llSuccess
  * (do some changes in Table2, and then:)
  llSuccess = TableUpdate()
  ...
  etc.
endif

* Repeat for Table3, etc.

if llSuccess
  end transaction && This will confirm all the changes
else
  rollback && This will undo changes to all the tables
endif
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform