wildcards in schema.ini

G

Guest

Is it possible to use wildcards in schema.ini files when the schema is the
same but the file name is different.

Instead of this

[data_1.csv]
NumberDigits=5

[data_2.csv]
NumberDigits=5

[data_3.csv]
NumberDigits=5

I want to do something like this

[data_%.csv]
NumberDigits=5

This is just a simple example to get my question across, the actual
schema.ini file that I need to create is going to be enormous if I have to
create every one long handed

Thanks in advance
Steve
 
J

John Nurick

Hi Steve,

I've never heard of schema.ini accepting wildcards. But all you have to
do is to have your code either rename your data file to match an
existing entry in schema.ini before importing it, or else create a new
schema.ini each time.

Or - if you're using DoCmd.TransferText - you could forget about
schema.ini and use an import specification in the database.

Is it possible to use wildcards in schema.ini files when the schema is the
same but the file name is different.

Instead of this

[data_1.csv]
NumberDigits=5

[data_2.csv]
NumberDigits=5

[data_3.csv]
NumberDigits=5

I want to do something like this

[data_%.csv]
NumberDigits=5

This is just a simple example to get my question across, the actual
schema.ini file that I need to create is going to be enormous if I have to
create every one long handed

Thanks in advance
Steve
 
G

Guest

Hi John

I am actually exporting not importing, but your suggestion of taking 2 steps
still works.

1. export to a generic file (as defined in schema.ini)
2. rename the file ( Name "D:\test\data.csv" As "D:\test\data" & version &
".csv ")

Thanks again
Steve

John Nurick said:
Hi Steve,

I've never heard of schema.ini accepting wildcards. But all you have to
do is to have your code either rename your data file to match an
existing entry in schema.ini before importing it, or else create a new
schema.ini each time.

Or - if you're using DoCmd.TransferText - you could forget about
schema.ini and use an import specification in the database.

Is it possible to use wildcards in schema.ini files when the schema is the
same but the file name is different.

Instead of this

[data_1.csv]
NumberDigits=5

[data_2.csv]
NumberDigits=5

[data_3.csv]
NumberDigits=5

I want to do something like this

[data_%.csv]
NumberDigits=5

This is just a simple example to get my question across, the actual
schema.ini file that I need to create is going to be enormous if I have to
create every one long handed

Thanks in advance
Steve
 

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