Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How would you do this?
Message
 
À
09/11/1999 22:02:39
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00287031
Message ID:
00289765
Vues:
48
Another question. After issuing UPDATE InvoceHeader SET LockedByUser=UserName WHERE InvoceID=ID and LockedByUser=null, and it fails, the table InvoiceHeader is at EOF(). All subsequent UPDATE's will now fail.

I get around this in VFP by issuing GO TOP IN InvoiceHeader first and then the UPDATE. Would the same thing happen with SQL-Server and how would I issue the same type of workaround?


>>Works great. But from what I can tell there is no actual return value from the function so I'm checking the value of _TALLY. Is this what you meant or did I miss something?
>>
>
>I thought you were using a SQL back end and would send the query with SQLExec which returns a OK or Fail code.
>
>>
>>UPDATE InvoceHeader SET LockedByUser=UserName WHERE InvoceID=ID and LockedByUser=null
>>
>>IF _TALLY#0
>>    <code for modification>
>>ELSE
>>    =REFRESH()
>>    WAIT WINDOW "Invoice being updated by user "+UserName NOWAIT
>>ENDIF
>>
>>
>
>Make sure you using the TableName in the UPDATE?
>
>Or, My guess is you are not refreshing what you think you are. Put a Select v_invoice before the refresh.
>
>
>BOb
Colin Magee
Team Leader, Systems Development
Metroland Media Group Ltd.
Mississauga, Ontario, Canada

cmagee@metroland.com

Never mistake having a career with having a life.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform