Click to See Complete Forum and Search --> : ODBC for Text Driver
Ste
October 11th, 1999, 10:38 AM
I've come across code in a previous job SQL code that selects data from a flat file (SELECT * FROM filename) using rdo and an ODBC for text driver but I cannot recreate this using good old DAO. Can anyone provide me with some code to do this because it is really iratating me!
Lothar Haensler
October 11th, 1999, 10:45 AM
you can do the same thing with DAO using the ODBC driver for text files.
You need to supply a SCHEMA.INI file though.It basically describes the structure of your text file.
here is a sample of one of my projects of a schema.ini:
[test.txt]
colnameheader=false
format=tabdelimited
characterset=ansi
col1=name char
col2=wert short
put the schema.ini in the same directory as the text file.
Ste
October 12th, 1999, 04:54 AM
Thanx for the reply, but I need a little more, the code used before allowed connection using the rdo .connect property, but DAO doesn't support this. If you have some sample code then I would really appreciate it. Please email to stevetodd@hotmail.com
Steve
daytripper
June 25th, 2004, 02:29 AM
Originally posted by Lothar Haensler
:
:
:
put the schema.ini in the same directory as the text file.
How do you "link" the schema.ini file in your VB-code? I'm having that problem.
hspc
June 26th, 2004, 02:43 AM
check this (http://www.connectionstrings.com) to know how to conenct to text files.
daytripper
June 26th, 2004, 08:04 AM
Originally posted by hspc
check this (http://www.connectionstrings.com) to know how to conenct to text files.
hspc,
thanks for your help but this isn't what I'm looking for. Found out thru MSDN that you only need to place the schema.ini file together with your data file.
regards.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.