Controle de Transação para Business Function
Auto - Commit
=================================
JDBReturn = JDB_InitBhvr ( lpBhvrCom, &hUser, (char*) Null, JDEDB_COMMIT_AUTO);
JDBReturn = JDB_OpenTable( hUser, NID_Fxxxxx , ID_Fxxxxx _yyyyy , NULL , (ushort) 0, (char * ) NULL , &hRequestFxxxxx );
JDBReturn = JDB_UpdateTable( hRequestFxxxxx, NID_Fxxxxx , (ID) NULL , ID_Fxxxxx_yyyyy , (void*) &dsFxxxxxKey , nNumKeys, (void*) &dsColFxxxxx);
JDBreturn = JDB_CloseTable (hRequestFxxxxx);
JDBreturn = JDB_FreeBhvr (hRequestFxxxxx);
Manual - Commit
=================================
JDBReturn = JDB_InitBhvr ( lpBhvrCom, &hUser, (char*) Null, JDEDB_COMMIT_MANUAL);
JDBReturn = JDB_OpenTable( hUser, NID_Fxxxxx , ID_Fxxxxx _yyyyy , NULL , (ushort) 0, (char * ) NULL , &hRequestFxxxxx );
JDBReturn = JDB_UpdateTable( hRequestFxxxxx, NID_Fxxxxx , (ID) NULL , ID_Fxxxxx_yyyyy , (void*) &dsFxxxxxKey , nNumKeys, (void*) &dsColFxxxxx);
if (JDBReturn == PASSED) {
JDB_CommitUser (&hUser);
} else (
JDB_RollbackUser (&hUser);
}
JDBreturn = JDB_CloseTable (hRequestFxxxxx);
JDBreturn = JDB_FreeBhvr (hRequestFxxxxx);
Auto - Commit
=================================
JDBReturn = JDB_InitBhvr ( lpBhvrCom, &hUser, (char*) Null, JDEDB_COMMIT_AUTO);
JDBReturn = JDB_OpenTable( hUser, NID_Fxxxxx , ID_Fxxxxx _yyyyy , NULL , (ushort) 0, (char * ) NULL , &hRequestFxxxxx );
JDBReturn = JDB_UpdateTable( hRequestFxxxxx, NID_Fxxxxx , (ID) NULL , ID_Fxxxxx_yyyyy , (void*) &dsFxxxxxKey , nNumKeys, (void*) &dsColFxxxxx);
JDBreturn = JDB_CloseTable (hRequestFxxxxx);
JDBreturn = JDB_FreeBhvr (hRequestFxxxxx);
Manual - Commit
=================================
JDBReturn = JDB_InitBhvr ( lpBhvrCom, &hUser, (char*) Null, JDEDB_COMMIT_MANUAL);
JDBReturn = JDB_OpenTable( hUser, NID_Fxxxxx , ID_Fxxxxx _yyyyy , NULL , (ushort) 0, (char * ) NULL , &hRequestFxxxxx );
JDBReturn = JDB_UpdateTable( hRequestFxxxxx, NID_Fxxxxx , (ID) NULL , ID_Fxxxxx_yyyyy , (void*) &dsFxxxxxKey , nNumKeys, (void*) &dsColFxxxxx);
if (JDBReturn == PASSED) {
JDB_CommitUser (&hUser);
} else (
JDB_RollbackUser (&hUser);
}
JDBreturn = JDB_CloseTable (hRequestFxxxxx);
JDBreturn = JDB_FreeBhvr (hRequestFxxxxx);
Comments
Post a Comment
Thanks for your comment!