Good morning... I've got one for ya. I've been trying to conenct to a csv text file = (comma delimited, \r\n row separators, and " text qualifiers) using the = odbc_connect command and then run simple select statements through it. = It doesn't work and I'm at a loss for why. Here's the meat (I replace = anything potentially sensitive with ***):
ODBC connection: Microsoft text driver version 4.00.6200.00 Win2K IIS = 5.0. ODBC schema: I have specified, for the particular file I am trying to = connect to, column name headers and ANSI format. That's it... // ODBC PHP connect string:=20 $odbc =3D odbc_connect("***input","",""); // This appears to work as no = errors are reported // ODBC commands to explore connection: $result =3D odbc_tables($odbc); odbc_fetch_into($result,$row); print_r($row); // I get the following output to the screen: Array ( [0] =3D> ***:\***\***\*** [1] =3D> [2] =3D> inputfile.txt [3] = =3D> TABLE [4] =3D> )=20 // Further commands to select data from text file: $result =3D odbc_exec($odbc,"SELECT * FROM inputfile.txt"); // ERROR to screen: Warning: SQL error: [Microsoft][ODBC Text Driver] The Microsoft Jet = database engine cannot open the file '(unknown)'. It is already opened = exclusively by another user, or you need permission to view its data., = SQL state S1000 in SQLExecDirect in ***:\***\***\***\basecsv2.html on = line 53 PHP Warning: SQL error: [Microsoft][ODBC Text Driver] The Microsoft Jet = database engine cannot open the file '(unknown)'. It is already opened = exclusively by another user, or you need permission to view its data., = SQL state S1000 in SQLExecDirect in ***:\***\***\***\basecsv2.html on = line 53=20 Any ideas? -Ethan, Modulus, LLC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php