RE: [PHP] SQL not allowing me to connect after multiple inserts
| From: | Valentin V. Petruchek | Date: | Wed, 17 Oct 2001 11:36:05 +0000 |
| Subject: | RE: [PHP] SQL not allowing me to connect after multiple inserts | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-71325@lists.php.net to get a copy of this message | ||
I do the same through ODBC and everything is OK.
Try to change php.ini:
------
mssql.batchsize = 0
------
----- Original Message -----
From: "BB" <bbisgod@hotmail.com>
To: <php-general@lists.php.net>
Sent: Wednesday, October 17, 2001 1:40 PM
Subject: [PHP] SQL not allowing me to connect after multiple inserts
> I am running an IIS 5, php as an ISAPI layer and MSSQL 2k
>
> When I try to insert more than one row into a table in one statement SQL
> cannot reconnect to the SQL server for the remainder of the page.
>
> I have not found a solution or any other case like this, here is my code:
>
> <?
> $query = "USE Test\n";
> $query .= "Insert into test (text) values ('query1');\n";
> $query .= "Insert into test (text) values ('query2');\n";
> $query_con = mssql_connect("localhost", "", "");
> echo "<pre>$query</pre>";
> if (mssql_query($query)) {
> echo "success";
> }
> echo "<hr>re-select table: Test<br>";
> mssql_select_db("Test");
> ?>
>
> thanks in advance
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>