So this code:

$odbc = odbc_connect("cvalcoinput","","") OR die("There is an error connecting to the 
CSV file.");
$result = odbc_tables($odbc);

while(odbc_fetch_into($result, $fields)){
  for ($i = 0; $i < sizeof($fields); $i++) {
    echo $fields[$i] . "<br>";

Derives the following results:


Which makes sense.  Those are the contents of the array returned by odbc_tables.  Now 
try to use odbc_exec and I run into my problems.  This article on the microsoft KB 
seems to suggest under "text driver limitations" that I should be able to run select 
statements using the odbc_exec command.;en-us;Q178717

Anyone know of any really good ODBC resources?

-----Original Message-----
From: Jay Blanchard [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 10, 2002 12:29 PM
To: Ethan Nelson; [EMAIL PROTECTED]
Subject: RE: [PHP] ODBC text file connection problem

// ODBC commands to explore connection:
$result = odbc_tables($odbc);

Have you tried a WHILE loop to print out each row? I am not sure of the exact syntax 
but something like;

while(odbc_fetch_into($result, &$fields)){
   // and so on ...
   print("<br>\n"); //at end of row


* Texas PHP Developers Conf  Spring 2003            *
* T Bar M Resort & Conference Center                *
* New Braunfels, Texas                              *
* Contact [EMAIL PROTECTED]       *
*                                                   *
* Want to present a paper or workshop? Contact now! *

PHP General Mailing List (
To unsubscribe, visit:

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to