php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #15782 Unsupported variant type: 8209 (0x2011)
Submitted: 2002-02-28 08:43 UTC Modified: 2002-03-11 13:12 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: gregoire at webjeff dot org Assigned:
Status: Closed Package: COM related
PHP Version: 4.1.1 OS: Windows 2000
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: gregoire at webjeff dot org
New email:
PHP Version: OS:

 

 [2002-02-28 08:43 UTC] gregoire at webjeff dot org
Hi,

With PHP 4.0.6 on Windows 2000, i use this code :

$conn = new COM("ADODB.Connection");
$conn->Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=C:/bdd.mdb;");
$rs = $conn->Execute("SELECT Libell? FROM [TV/Substrat]");
$num_fields = $rs->Fields->Count();
while (!$rs->EOF)
	{
    	for ($i=0; $i < $num_fields; $i++)
    		{
		$f=$rs->Fields($i);
		$field_value=$f->Value;
		echo "$field_value<br>\n";
		}
    	$rs->MoveNext();
	}	

It works fine and the result is :

--------------------
CARB
HSS
HSS-E
HSS-E5
HSS-E8
HSS-EE
HSS-ES
HSS-PM
--------------------

But after installing the application software "IBM AS400 Client Access Express", (but i can't proove actually, it's because of it), i've got this message :

--------------------
Unsupported variant type: 8209 (0x2011)
--------------------

I think this software changed the ODBC drivers as i can see "Microsoft Access Driver" and "Microsoft Access-Treiber" for example.

I updated PHP to 4.1.1 and the result for the previous code was :

--------------------
Array
Array
Array
Array
Array
Array
Array
Array
--------------------

When i print each element of an array i had something like this :

--------------------
670650820660
720830830
720830830450690
720830830450690530
720830830450690560
720830830450690690
720830830450690830
720830830450800770
--------------------

So, i understood it was ascii codes separated by "0". After applying CHR() function to each element i have the right previous answer (CARB, HSS, etc...).

Well, what's the trouble ?

Jean-Fran?ois GAZET (France)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-02-28 08:49 UTC] gregoire at webjeff dot org
I add that with the error message "Unsupported variant type: 8209 (0x2011)" the line which caused the error was "$field_value=$f->Value;"
 [2002-03-11 13:12 UTC] phanto@php.net
seems that your 'new' odbc driver treats the column data type as an array of char instead of a string thus you get back an array (which wasn't supported < 4.1.x) instead of a string.
but again, don't use ADO, use odbc_connect()

harald
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 07:01:30 2024 UTC