Re: Stored procs and transactions using Linux/PHP and Windows/MSSQL
| From: | Rick Emery | Date: | Wed, 27 Sep 2006 16:50:40 +0000 |
| Subject: | Re: Stored procs and transactions using Linux/PHP and Windows/MSSQL | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-242314@lists.php.net to get a copy of this message | ||
Quoting Richard Lynch <ceo@l-i-e.com>:
On Wed, September 27, 2006 7:40 am, Rick Emery wrote: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 trying to do something like this in the PHP application: begin transaction execute a stored procedure, receiving an identity back if certain conditions are metYou have to describe your problems to get useful help.execute another stored procedure, getting an identityif certain other conditions are metexecute another stored procedure, getting an identityif any of the above procedures failrollback transactionelsecommit transactionI 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).
Agreed. I just need to somehow find the successful one(s) :-) Thanks, RickI'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.