#35839 [Opn->Fbk]: mssql_query(): "Possible network error: Bad token from SQL Server.."
| From: | sniper@php.net | Date: | Thu, 29 Dec 2005 15:37:22 +0000 |
| Subject: | #35839 [Opn->Fbk]: mssql_query(): "Possible network error: Bad token from SQL Server.." | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-91220@lists.php.net to get a copy of this message | ||
ID: 35839
Updated by: sniper@php.net
Reported By: muratyaman at gmail dot com
-Status: Open
+Status: Feedback
Bug Type: MSSQL related
Operating System: Win XP Pro SP2
PHP Version: 5.1.1
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php5.1-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5.1-win32-latest.zip
Previous Comments:
------------------------------------------------------------------------
[2005-12-29 16:33:49] muratyaman at gmail dot com
Description:
------------
Error message is:
"mssql_query() [function.mssql-query]: Possible network error: Bad
token from SQL Server: Datastream processing out of sync. (severity 9)
in file ... line ..."
I have a WinXP, Apache2, PHP5, MSDE2000 app and many pages inserting,
updating, deleting records..
Pages for inserts include code to return on error and not lose entered
data.
Reproduce code:
---------------
(Every page opens connection, queries database multiple times, closes
the connection.)
Create a form with a few textboxes and a combobox.
I create a combobox with:
<?
$selected_option = 0;
echo db_combo('field1', 'select field1 from tbl1', $selected_option);
?>
db_combo simply uses mssql_query to select records from a table, fill
with options, create HTML code of a combobox with
<select>
<option></option>
</select>
I use a global $dbh to handle database connection, also use
mssql_connect, mssql_select_db functions.
Expected result:
----------------
1. load page: tbl2_new.php
combobox FULL with records read from the table
2. post to : tbl2_insert.php
may not insert record because of normal reasons
3. return to: tbl2_new.php
any entered data is post back
combobox FULL with records read from the table
4. post to : tbl2_insert.php
insert record
Actual result:
--------------
1. load page: tbl2_new.php
with EMPTY combobox and ERROR
connection is lost
every call afterwards to mssql_query fails
2. post to : tbl2_insert.php
may or may not insert record
3. return to: tbl2_new.php
any entered data is post back
combobox FULL with records read from the table
no problem at all
Briefly, "new" and "edit" pages are very much similar with comboboxes
etc. But on "new" pages, combobox cannot get any records on 1st run.
I could not figure out the problem.
But I think there is a communication problem when SQL server tries to
send the records from a table.
Thanks in advance.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=35839&edit=1