Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Locking with SQL7
Message
De
29/02/2000 10:41:04
 
 
À
29/02/2000 10:18:32
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00338970
Message ID:
00339110
Vues:
15
>lSuccess = .f.
>Do While Not lSuccess
> cSQL = "SELECT LastNumber FROM NumberTable WHERE cKey = 'TABLENAME'"
>
> SQLExec(nConn, cSQL)
>
> nLastNumber = SQLResult.LastNumber
> nNewId = nLastNumber + 1
>
> cSQL = "UPDATE NumberTable SET LastNumber = nNewID WHERE "+ ;
> "cKey='TABLENAME' and LastNumber = nLastNumber"
>
> lSuccess = ( SQLExec(nConn, cSQL) = 1 )
>EndDo


Thanks Bob, this seems to be a good solution. Not the most elegant way to obtain the goal, but I suppose there is no better way. Wouldn't have found it myself ....
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform