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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

BDE Import txt,csv table

Status
Not open for further replies.

GeoEnaru

Programmer
Mar 15, 2004
7
RO
I'm using BDE for importing a txt table in my program. I create runtime an ODBC datasource writing directly in registry, but it seems not to work. I created an ODBC datasource manualy and then I created writing in registry a new datasource with exactly same structure and keys, but when I'm trying to open this datasource from ODBC Administrator I get this error:"The setup routines for the Microsoft text driver(*.txt;*.csv) ODBC driver could not be found. Please reinstall the driver". ODBC datasource created directly in ODBC Administrtor works just fine.
Using same method I created an ODBC datasource for MSAcces database and it works.
Pls help.
 
You don't need an ODBC data source to access .CSV and .TXT files. You do, however, need a Schema file that matches the format of your data. You can find information about Schema files in the BDE help file, bde32.hlp (it's in the same folder as the BDE - usually C:\Program Files\Common Files\Borland Shared\BDE - and isn't normally available through the Delphi help menu.) Search for the word "Schema" and you'll see the instructions for creating this.

You then use the folder the data file is in as the "DatabaseName" of your TTable, the file name as the "TableName". The schema file must have the same name as the data file with the extention ".sch".

-D
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top