Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't connect csv/txt file to Table1

Status
Not open for further replies.

BBMtnMan

Programmer
Nov 25, 2003
1
US
Connecting .mdb, .db, & .dbf with ODBC and then using them with TdataSource, TTable, and TDBGid is straightforward. But when I connect .txt/.csv files with ODBC and then try to attach them to Table1, I get 'DBE Error 10039 27 37 Invalid table name.' Of course, I have renamed the table (and the file) to everything under the sun. I have tried the procedure in Builder 5 and Builder 6, win 98, win2000pro, and XP pro. Still, no joy.

What is the trick?

 
The BDE calls SQLTables to determine whether a table name exists. The BDE does not expect table names returned by SQLTables to have an extension, but Microsoft's Text driver does include extensions (Because unlike other drivers, it allows for tables with different extensions within the same database.) and therefore the tablename cannot be verified.
There are two possible workarounds to the problem: . Use text files without extensions. To configure Microsoft's ODBC Text driver to do this run ODBC Administrator, configure your DSN, click Options, and *. as an extension. 2. Use the BDE Native Text driver instead.
 
Found this in another forum,
however it doesnt work, just produces another error.
It says now the file is write protected and cant be updated.
Sorry...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top