Creating Tables with ASCII Schema file (.sch)

  • Thread starter Thread starter Bill
  • Start date Start date
B

Bill

Is it possible to create Access Tables from ASCII schema files (.sch)? We
have text files containing information like the following:

Filetype=Delimited
Delimiter="
Separator=,
CharSet=ascii
Field1=FirstName,Char,12,00,00
Field2=LastName,Char,15,00,12

Thanks.
 
Well, yes it can be done. You would need VB code to do so, however. If it
were me, I'd open the text file with low-level IO (old style BASIC), step
through each line and build an SQL CreateTable statement based on the values
in the file.

I don't have a sample that does exactly this, a combination of two samples
on my website (www.rogersaccesslibrary.com), would do the trick. They are
"ImportLineInput2k.mdb" and "RecreateTableInSQL.mdb". The first shows how
to step through your text file and the second, how to create a SQL Create
Table statement.
--
--Roger Carlson
MS Access MVP
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L
 
Back
Top