Re: COM

From: Date: Sat, 29 Mar 2003 16:20:13 +0000
Subject: Re: COM
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-26700@lists.php.net to get a copy of this message
Hi Kiswa, You are using mixing programming styles incorrectly. "Kiswa" <Kiswa@telia.com> wrote in message news:20030329091855.15126.qmail@pb1.pair.com... > Server Win2000 +ISS5 +PHP > Trying to get access to an access DB through COM but i wont work. there is > no results generated. > Can anyone help me > Here is the code > > $rownum =0; > $conn = &ADONewConnection('access'); > $conn->PConnect('webdb.mdb'); > $result = &$conn->Execute('SELECT Produkt, Artikelnr, Pris, Lagerstatus, > Beskrivning, Kategori, Bild FROM Data'); Using ADOdb > > while(odbc_fetch_row($result)){ > $Produkt = odbc_result($result, Produkt); > $Artikelnr = odbc_result($result, Artikelnr); > $Pris = odbc_result($result, Pris); > $Lagerstatus = odbc_result($result, Lagerstatus); > $Beskrivning = odbc_result($result, Beskrivning); > $Kategori = odbc_result($result, Kategori); > $Bild = odbc_result($result, Bild); Then using native odbc, which will not work because $result is an ADOdb recordset, and not odbc resultid. Hope this helps. John PS: ODBC does not use COM.

« previous php.db (#26700) next »