php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #18514 TEXT S1002 SQL error
Submitted: 2002-07-23 17:28 UTC Modified: 2002-07-23 17:47 UTC
From: drake at virtualdrake dot com Assigned:
Status: Closed Package: ODBC related
PHP Version: 4.2.2 OS: windows 2000
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: drake at virtualdrake dot com
New email:
PHP Version: OS:

 

 [2002-07-23 17:28 UTC] drake at virtualdrake dot com
Warning: SQL error: [Microsoft][ODBC SQL Server Driver]Invalid Descriptor Index, SQL state S1002 in SQLGetData in c:\program files\apache group\apache\htdocs\gettable.php on line 135


When trying to get a text field from MS SQL, it is mis-representing THe length of the field 2147483647

most are actually NULL, but some are a whole 30 characters

	 if(odbc_result($cur,$w)==NULL)


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-07-23 17:47 UTC] kalowsky@php.net
1) This isn't an MS SQL issue, this is an ODBC issue (as per your error warning).

2) Under ODBC v2 (which is what PHP is), type TEXT is not a valid SQL Type.  Any result you get from it is by chance.  
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 22:01:29 2024 UTC