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: D:\INETPUB\CVALCO\INCLUDE\INPUT inputfile.txt TABLE 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. http://support.microsoft.com/default.aspx?scid=kb;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 [snip] // ODBC commands to explore connection: $result = odbc_tables($odbc); odbc_fetch_into($result,$row); print_r($row); [/snip] Have you tried a WHILE loop to print out each row? I am not sure of the exact syntax but something like; <?php while(odbc_fetch_into($result, &$fields)){ print($fields[0]); print($fields[1]); // and so on ... print("<br>\n"); //at end of row } ?> Jay ***************************************************** * 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 (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php