help. i would like to know whether a transaction is successful or not, what should i do? right now i have something like this:
********************TSQL******************
declare @success int
BEGIN TRAN
...
...
...
IF (@@ERROR<>0) BEGIN
set success=1
COMMIT TRAN
END
select @success as success
*****************************************
$res=mssql_query([that_whole_thing],$db_link)
************************************************
it runs fine when i run it on MSSQL Server but running it from php using mssql_query will execute the transaction, but not the select clause.
mssql_fetch_object($res) returns nothing, same with
mssql_fetch_array($res).
anyone have any ideas?
Need help with MSSQL Transactions
Moderator: General Moderators
Hi
Did you ever figure out this problem of yours? I have the same problem. I need to run BEGIN TRANSACTION, ABORT, COMMIT on several queries but seem to have problems where the transactions are not working. MSSQL returns me an error to my php page when I send it a COMMIT query.
Thanks,
Ly
Thanks,
Ly