Creating Tables with ASCII Schema file (.sch)

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.
 
R

Roger Carlson

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top