ID: 15782
Updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
-Status: Open
+Status: Closed
Bug Type: COM related
Operating System: Windows 2000
PHP Version: 4.1.1
New Comment:
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
Previous Comments:
------------------------------------------------------------------------
[2002-02-28 08:49:36] [EMAIL PROTECTED]
I add that with the error message "Unsupported variant type: 8209
(0x2011)" the line which caused the error was "$field_value=$f->Value;"
------------------------------------------------------------------------
[2002-02-28 08:43:01] [EMAIL PROTECTED]
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)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=15782&edit=1