Help needed with MS ODBC - Text driver and BDE 
Author Message
 Help needed with MS ODBC - Text driver and BDE

Hi,
I'm trying to import a machine generated ASCII list into a real
database (MSSQL7 via MS SQL ODBC driver and bde)

because I didn't want to hard-code the text parser myself, I just
wanted to use the MS-Text driver or maybe the BDE ASCIIDRV

eventually I gave a try to ODBC, so I set up an ODBC-datasource with
properly defined fields and their formats,
this worked well with excel and so on...

my problem is that database desktop / sqlexplorer does not recognize
any of the fields and their corresponding format definitions I made in
this ODBC datasource,

I can see  the tables in SQL explorer but if I try to select one of
them it says 'Invalid Tablename' and no field definitions are
available

Do I really have to fall back to a hard-coded import routine or is
there any way to get ms-text driver working with the bde ?

any help is greatly appreciated

SeeYa,
Stefan Kratzsch



Wed, 18 Jun 1902 08:00:00 GMT  
 Help needed with MS ODBC - Text driver and BDE
Just drop a TTable component, set TableType to ttAscii and fill tablename
property. To make it work properly you only have to create the schema file
(structure info file)
TABLE1.TXT - database file
TABLE1.SCH - schema file looks like:

[TABLE1]
FileType=Fixed
;or
FileType=delimited
;lang driver
CharSet=ANSIINTL

Delimiter="
Separator=,
;follow the fields in format:
FieldXX=<Name>,<type>,<length>,<decimals>,<line offset>
Field1=K_STATUS,Char,01,00,00
Field2=Name,Char,10,00,01

If you allready have a table with that structure (in msssql), you can borrow
structure from it and let BDE create the schema file for you:
  TextTable.FieldDefs.Assing(mssqltable.fielddefs);
  TextTable.CreateTable;

For more info search borland site for TI about ascii files.

--
----------------------
Regards
Robert Cerny
Remove both qwe when replying

No questions via email, unless explicitly invited.

Quote:

>Hi,
>I'm trying to import a machine generated ASCII list into a real
>database (MSSQL7 via MS SQL ODBC driver and bde)

>because I didn't want to hard-code the text parser myself, I just
>wanted to use the MS-Text driver or maybe the BDE ASCIIDRV

[snip]


Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. BDE 4.5 and MS-Text-Driver

2. problems with ODBC drivers and BDE alias: I need explanation

3. telling the difference between BDE drivers and ODBC drivers

4. Text file device driver in Object Widows (need help)

5. Need help accessing Access with either native or ODBC drivers

6. HELP: Need Level2 Oracle ODBC Drivers

7. ODBC Text Driver and Decimal values

8. ODBC excel and text drivers

9. ODBC Driver for Text Files

10. 32-bit ODBC Text File Driver

11. ODBC text drivers and Delphi 3.0

12. INFO: The TDatabase component and MS's dBase ODBC driver

 

 
Powered by phpBB® Forum Software