Quoting Richard Lynch <[EMAIL PROTECTED]>:
On Wed, September 27, 2006 7:40 am, Rick Emery wrote:
I'm trying to do something like this in the PHP application:
begin transaction
execute a stored procedure, receiving an identity back
if certain conditions are met
execute another stored procedure, getting an identity
if certain other conditions are met
execute another stored procedure, getting an identity
if any of the above procedures fail
rollback transaction
else
commit transaction
I ran into some problems using both PDO and the mssql_* functions (if
someone is successful using one of these, I'll likely be asking in a
future message for help with the problems I'm encountering).
You have to describe your problems to get useful help.
True. In this message, I was looking for people who had done what I
was attempting in order to solicit advice. But recognizing that I may
not find anybody, I guess I should try to find some help with the
specific problems.
With PDO, I use the dblib driver (which is the driver that all of the
documentation I can find says to use). Unfortunately, the dblib driver
does not support transactions; I've filed an enhancement request.
With the mssql functions, the first problem was that the "bigint" data
type is not supported. I coded around that (by using "varchar" and
converting it in the stored procedure), but now I get:
Warning: mssql_query() [function.mssql-query]: Query failed in
/var/www/html/business/entity.php on line 127
which is:
mssql_query('RollBack Transaction');
but can't get any information about why it failed. Running the same
commands in Query Analyzer works without error.
I'm just asking to see if anyone is successfully doing what I'm trying
to do, and if so, what method is being used to accomplish it.
The probability that *nobody* from the millions of PHP users and the
millions of MS SQL users is doing this is pretty much 0.
Agreed. I just need to somehow find the successful one(s) :-)
Thanks,
Rick
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php