note 72247 added to function.odbc-fetch-array

From: Date: Tue, 09 Jan 2007 12:46:49 +0000
Subject: note 72247 added to function.odbc-fetch-array
Groups: php.notes 
Request: Send a blank email to php-notes+get-121485@lists.php.net to get a copy of this message
I am using MS SQL Server 2005, and using odbc_connect with SQL_CUR_USE_ODBC. I had a problem with odbc_fetch_array when getting results from a stored procedure that returns a text column. The misleading error I got was: odbc_fetch_array() [function.odbc-fetch-array]: SQL error: [Microsoft][ODBC Cursor Library] Result set was not generated by a SELECT statement, SQL state SL004 in SQLGetData Eventually I found that by converting the text column in my database to varchar(8000), it worked fine. Perhaps using CONVERT or CAST might have worked too. I also found that varchar(max) columns were scrambled. ---- Server IP: 66.163.161.117 Probable Submitter: 195.224.205.194 ---- Manual Page -- http://www.php.net/manual/en/function.odbc-fetch-array.php Edit -- https://master.php.net/note/edit/72247 Del: integrated -- https://master.php.net/note/delete/72247/integrated Del: useless -- https://master.php.net/note/delete/72247/useless Del: bad code -- https://master.php.net/note/delete/72247/bad+code Del: spam -- https://master.php.net/note/delete/72247/spam Del: non-english -- https://master.php.net/note/delete/72247/non-english Del: in docs -- https://master.php.net/note/delete/72247/in+docs Del: other reasons-- https://master.php.net/note/delete/72247 Reject -- https://master.php.net/note/reject/72247 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#121485) next »