ID: 30601 Updated by: [EMAIL PROTECTED] Reported By: jcastro at elnuevodia dot com -Status: Feedback +Status: No Feedback Bug Type: ODBC related Operating System: Windows Xp PHP Version: 5.0.2 New Comment:
No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Open". Thank you. Previous Comments: ------------------------------------------------------------------------ [2005-03-07 22:28:28] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5-latest.tar.gz For Windows: http://snaps.php.net/win32/php5-win32-latest.zip ------------------------------------------------------------------------ [2004-10-28 17:27:27] jcastro at elnuevodia dot com Description: ------------ I am getting the following warning: Warning: odbc_result(): SQL error: [INTERSOLV][ODBC SQL Server driver][SQL Server]ct_get_data(): user api layer: external error: Item 19 has already been read., SQL state S1000 in SQLGetData in \Inetpub\wwwroot\clasificados\lib\odbcLib.ph p on line 123 If I just read 18 fields it will NOT GIVE ME A WARNING. It will only appear on field 19 and then it will continue reading without problems. (VIEW OUTPUT) The problems is bigger than it look. I was using ADODB and for some reason even though a select statement was getting executed I was not getting the data. I remove the adodb code and used the standard odbc code. That's when I found what I think was causing adodb not to return anything. I found this by coincidence because I was checking my output with and older system. Otherwise adodb did not report any problems.I nknow you are not responsible for adodb. But this is odbc problems. I tried 4.3.9 and 5.0.2., same problem. If you try using fetch_array instead of my code it will cause the same error. I am using Sybase. The table is CREATE TABLE AdsHomes ( homeID numeric(10,0) IDENTITY, customerCode char(20) NOT NULL, bedrooms int NULL, bathrooms decimal(5,1) NULL, sqfoot decimal(10,2) NULL, price decimal(15,2) NULL, mls varchar(50) NULL, homeRefID varchar(15) NULL, homeTypeID numeric(3,0) NULL, stories smallint NULL, lotSize decimal(10,2) NULL, yearBuilt char(4) NULL, address1 varchar(100) NULL, address2 varchar(100) NULL, city varchar(50) NULL, state char(2) NULL, newspaperTitle varchar(255) NULL, newspaperText text NULL, internetText text NULL, billingLines tinyint NULL, classificationCode char(4) NULL, dateCreated datetime DEFAULT GETDATE() NOT NULL, statNewspaperPubs int DEFAULT 0 NULL, statInternetPubs int DEFAULT 0 NULL, statInternetVisits int DEFAULT 0 NULL, statPhoneCalls int DEFAULT 0 NULL, nearSchool char(1) NULL, nearTransit char(1) NULL, oceanView char(1) NULL, mountainView char(1) NULL, applConvOven char(1) NULL, applDishWasher char(1) NULL, applElectCookTop char(1) NULL, applElectOven char(1) NULL, applGasCookTop char(1) NULL, applGasOven char(1) NULL, applElectWaterHeater char(1) NULL, applSolarWaterHeater char(1) NULL, applWaterSofterner char(1) NULL, applAirConditioner char(1) NULL, photoCount smallint NULL, photoPrevIdx smallint DEFAULT 0 NULL, userID numeric(10,0) NULL, userID2 numeric(10,0) NULL, isHidden char(1) DEFAULT "N" NULL, visualTourPath varchar(255) NULL, CONSTRAINT AdsHomes_homeID_PK PRIMARY KEY NONCLUSTERED (homeID) ) Reproduce code: --------------- $sql = "SELECT * FROM AdsHomes WHERE homeID=75283"; $resultID = odbc_do($this->cn, $sql); $array = false; $cols = odbc_num_fields($resultID); while(odbc_fetch_row($resultID)) { // for($i=1;$i<$cols+1;$i++) ORIGINAL CODE for($i=1;$i<21;$i++)//FOR TESTING PURPOSES $array[odbc_field_name($resultID,$i)] = trim(odbc_result($resultID, $i)); break; } return $array; Actual result: -------------- READING 13 READING 14 READING 15 READING 16 READING 17 READING 18 READING 19 Warning: odbc_result(): SQL error: [INTERSOLV][ODBC SQL Server driver][SQL Server]ct_get_data(): user api layer: external error: Item 19 has already been read., SQL state S1000 in SQLGetData in :\Inetpub\wwwroot\clasificados\lib\odbcLib.ph p on line 123 READING 20 READING 21 READING 22 READING 23 READING 24 READING 25 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=30601&edit=1