Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Import Specification and Schema.Ini Files

Status
Not open for further replies.

OMoore

Technical User
Oct 23, 2003
154
EU
Hi all,

I am importing a delimited text file into a new database table.

When I use the "get external data" method i can create an import specification. For VB code using the transfertext command, can I use the same import specification or (as I suspect!) do I need to create a schema.ini file? If so how is this done? Can I transfer the import specification details to the schema file.

Also, where does the import spec file get saved to? Access help states that it saves to the same directory as the import file, however I can't find it there? I have changed the folder options to view all file types, but still don't see it. I've also searched my entire hard drive for the file.

Thanks for the help,
Owen
 
Hi

Cannot help you with the schema.ini question, but the import specification (I believe) is stored in an Access System table, and hence is available only in the db in which it was created

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
I thought the import specification was saved in the database itself. The only way I know how to create one is to use the wizard and give it an appropriate name. This can then be used in VBA.
I have also used schema.ini to create a link via VBA to delimited text files that I export from another system. The schema.ini does need to be in the same directory as the files to be imported/linked. The great benefit of this is that the exported files can have a different structure, so I create the appropriate schema.ini at the same time as the exported files. My Access VBA then breaks and renews the link each time it is run.
Simon Rouse
 
Guys,

I didn't realise you could use the import specification name in VBA. I thought it had to be a schema file. I've used the import spec and it worked.

Thanks very much!!

Owen
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top