Problem using schema.ini

K

keith

Hello,

I created a test filel with data, and named it MyData.txt
I then created a schema.ini file with the layout of the
filel as describee in Microsoft on-line help file
odbcjetsdk_98.asp I created a new mdb file where the test
data will reside. Now, I'm having difficulty using the
schema file to get the data from MyData.txt into the new
mdb file. I used File-->Get External Data --> Import -->
select txt file --> select MyData.txt and the form does
not include the formats in the schema.ini file and does
not give me any option under "Advanced" to identify the
schema.ini file. So obviously I'm still doing something
wrong. I hope this explanation is sufficient, and look
forward to any suggestions.

Thank you,

Keith
 
J

John Nurick

Hi Keith,

Schema.ini must be in the same folder as the file you're importing, and
there must be an entry in schema.ini for the particular file (or rather
filename). Each entry looks somewhat like this:

[MyData.txt]
ColNameHeader=True
CharacterSet=1252
Format=TabDelimited
Col1=ID Integer
Col2=Firstname Char Width 50
Col3=Lastname Char Width 50
Col4=Street Char Width 60
Col5=City Char Width 40
Col6=Postcode Char Width 14
Col7=NumberNum Integer
Col8=Comment Char Width 255
Col9=Checked Bit
 
K

Keith

Hi John,

Thanks very much. I have it set up as you describe, and
am trying to figure out how to get it to function in the
sequence of import forms that one uses in access to
actually bring in the data. I thought it would
automatically show up as a choice under the advanced
option. Am puzzled as to how it actually becomes useful.

Keith

-----Original Message-----
Hi Keith,

Schema.ini must be in the same folder as the file you're importing, and
there must be an entry in schema.ini for the particular file (or rather
filename). Each entry looks somewhat like this:

[MyData.txt]
ColNameHeader=True
CharacterSet=1252
Format=TabDelimited
Col1=ID Integer
Col2=Firstname Char Width 50
Col3=Lastname Char Width 50
Col4=Street Char Width 60
Col5=City Char Width 40
Col6=Postcode Char Width 14
Col7=NumberNum Integer
Col8=Comment Char Width 255
Col9=Checked Bit


Hello,

I created a test filel with data, and named it MyData.txt
I then created a schema.ini file with the layout of the
filel as describee in Microsoft on-line help file
odbcjetsdk_98.asp I created a new mdb file where the test
data will reside. Now, I'm having difficulty using the
schema file to get the data from MyData.txt into the new
mdb file. I used File-->Get External Data --> Import --
select txt file --> select MyData.txt and the form does
not include the formats in the schema.ini file and does
not give me any option under "Advanced" to identify the
schema.ini file. So obviously I'm still doing something
wrong. I hope this explanation is sufficient, and look
forward to any suggestions.

Thank you,

Keith

--
John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
.
 
J

John Nurick

Hi Keith,

I don't know how schema.ini interacts with settings you make in the text
import wizard, but when you're importing under program control (in VBA,
DoCmd.TransferText) you simply omit the other settings. If schema.ini
exists in the folder and contains an entry for the filename, Access
should use it.


Hi John,

Thanks very much. I have it set up as you describe, and
am trying to figure out how to get it to function in the
sequence of import forms that one uses in access to
actually bring in the data. I thought it would
automatically show up as a choice under the advanced
option. Am puzzled as to how it actually becomes useful.

Keith

-----Original Message-----
Hi Keith,

Schema.ini must be in the same folder as the file you're importing, and
there must be an entry in schema.ini for the particular file (or rather
filename). Each entry looks somewhat like this:

[MyData.txt]
ColNameHeader=True
CharacterSet=1252
Format=TabDelimited
Col1=ID Integer
Col2=Firstname Char Width 50
Col3=Lastname Char Width 50
Col4=Street Char Width 60
Col5=City Char Width 40
Col6=Postcode Char Width 14
Col7=NumberNum Integer
Col8=Comment Char Width 255
Col9=Checked Bit


Hello,

I created a test filel with data, and named it MyData.txt
I then created a schema.ini file with the layout of the
filel as describee in Microsoft on-line help file
odbcjetsdk_98.asp I created a new mdb file where the test
data will reside. Now, I'm having difficulty using the
schema file to get the data from MyData.txt into the new
mdb file. I used File-->Get External Data --> Import --
select txt file --> select MyData.txt and the form does
not include the formats in the schema.ini file and does
not give me any option under "Advanced" to identify the
schema.ini file. So obviously I'm still doing something
wrong. I hope this explanation is sufficient, and look
forward to any suggestions.

Thank you,

Keith

--
John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
.
 

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