> You can't split a transaction between multiple calls to mssql_query. The
> memory used (in the server and client) are cleared between each call.
> You would have to create a batch of statements and execute these with one
> call to mssql_query.
No, I found solution in the end!:
SET XACT_ABORT O
> You can't split a transaction between multiple calls to
> mssql_query. The memory used (in the server and client)
> are cleared between each call.
Are you sure?
Because this denies that:
mssql_query("SELECT @@TRANCOUNT"); // returns 0
mssql_query("BEGIN TRANSACTION");
mssql_query("SELECT @@TRAN
Hi,
You can't split a transaction between multiple calls to mssql_query. The
memory used (in the server and client) are cleared between each call.
You would have to create a batch of statements and execute these with one
call to mssql_query.
- Frank
> I have an opened connection to MS SQL Serve
I have an opened connection to MS SQL Server 7
and I try to do this:
$commit = FALSE;
// SELECT @@TRANCOUNT returns 0 here = OK
if(mssql_query("BEGIN TRANSACTION")) {
// SELECT @@TRANCOUNT returns 1 here = OK
if(mssql_query("INSERT INTO TABLE (DATE) VALUES ('$date')")) {
// ...
I have an opened connection to MS SQL Server 7
and I try to do this:
$commit = FALSE;
// SELECT @@TRANCOUNT returns 0 here = OK
if(mssql_query("BEGIN TRANSACTION")) {
// SELECT @@TRANCOUNT returns 1 here = OK
if(mssql_query("INSERT INTO TABLE (DATE) VALUES ('$date')")) {
// ...