Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problema con el siguiente consecutivo
Message
 
À
18/04/2002 17:18:34
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00646072
Message ID:
00646666
Vues:
17
Disculpas Hilmar, te estaba escribiendo un ejemplo de transacciones con SQL y sin querer pulse el 'Enviar', mas o menos seria así:
nHandle = SQLCONNECT("odbc_driverSQLServer")
*-- Setting las transacciones en forma manual
SQLSETPROP(nHandle, 'Transactions', 2)

BEGIN TRANSACTION
*-- Codigo... 

IF Confirma_Grabar()
    IF SQLCOMMIT(nHandle) >= 0
        *-- Grabo Ok.
        END TRANSACTION	   
    ENDIF
ELSE
    SQLROLLBACK(nHandle)
    ROLLBACK
ENDIF   
>Dentro de VFP, para los números de documento, sólo los asigno en el momento >de guardar, y uso una transacción. Si no se puede guardar (TableUpdate() >falla), anulo la transacción. Pero no sé cómo serían las transacciones con >SQL Server.
>Hilmar.

Ricardo._
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform