php-db | 2002091
Date: 09/10/02
- Next message: Franz Kornberger: "AW: [PHP-DB] PHP in a javascript function with DB calls."
- Previous message: chip.wiegand <email protected>: "[PHP-DB] update db problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hello,
I'm having trouble connecting via ODBC using the Microsoft text driver on a win2k box. I read the KB article at http://support.microsoft.com/default.aspx?scid=kb;en-us;Q178717 and it seems to suggest that I should be able to select data from a text source. Here is what I have so far:
odbc_close_all();
$odbc = odbc_connect("cvalcoinput","","") OR die("There is an error connecting to the CSV file.");
$result = odbc_tables($odbc);
odbc_fetch_into($result, $fields)
print_r($fields);
-------------------------
unset($fields);
$result = odbc_exec($odbc,"SELECT * from inputfile.txt");
odbc_fetch_into($result, $fields)
print_r($fields);
The connection and following tables commands work great, but when I actually select data via the odbc_exec command, I get the following error:
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
Any ideas?
-Ethan, Modulus, LLC
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
- Next message: Franz Kornberger: "AW: [PHP-DB] PHP in a javascript function with DB calls."
- Previous message: chip.wiegand <email protected>: "[PHP-DB] update db problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

