Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can I use INSERT-SQL in multiuser
Message
De
21/07/2006 00:36:04
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
21/07/2006 00:27:43
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01137935
Message ID:
01138298
Vues:
11
>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)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform