Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problema con el siguiente consecutivo
Message
 
To
18/04/2002 17:18:34
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00646072
Message ID:
00646666
Views:
16
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._
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform