|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-02-28 08:49 UTC] gregoire at webjeff dot org
[2002-03-11 13:12 UTC] phanto@php.net
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 19:00:01 2025 UTC |
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)