schema.ini files

C

Conan Kelly

Hello all,

MS Access' (2002) VBA help files says "To create a schema file, you can use the text import/export wizard to create the file." for
the TransferText Method.

I've looked all over on how to create schema.ini files. Searching MS Access Help files just breifly mentions schema.ini files, but
says nothing on creating them nor gives any examples. I see nothing in the Import Wizard dialog boxes that would allow me to
save/create a schema.ini file.

I already have an Import specification created and saved (that is different than a schema.ini file though, correct?!?).

How do I create one? If I have to create it from scratch (typing it out in Notepad), is there any examples out there that I can
model it after?

Thanks for any help anyone can provide,

Conan Kelly
 
J

John Nurick

Hi Conan,

You can use a schema.ini file instead of an import specification.
schema.ini must be placed in the same folder as the file you're
importing (or the folder you're exporting to), and must have a section
headed with the exact filename.

Access will create a schema.ini file for you if you use a make-table
query to export to a text file, e.g.
SELECT * INTO [text;database=C:\temp].[mytable#txt] FROM mytable;
or if you export to Microsoft Word mailmerge format, or if you use the
ODBC control panel to set up the text file as a data source.

See also:
Create a Schema.ini file based on an existing table in your database:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;155512
How to Use Schema.ini for Accessing Text Data
http://support.microsoft.com/default.aspx?scid=kb;EN-US;149090

Documentation for Schema.ini is towards the end of the Help topic
"Initializing the Text Data Source Driver" (under Microsoft Jet SQL
Reference in Help Contents).
 
M

MikeV06

I am trying to use the make-table query to export the schema to a file. I
keep getting an error. My Select statement is

SELECT * INTO [text;database=C:\Work].[GL_Transactions#txt]
FROM 'GL Transactions';

I get an "Incomplete query" syntax error.

I just want to dump the schema to a text file. The table name is GL
Transactions. What is wrong with the syntax?

I read the articles you mentioned. However, none of them help me with the
above syntax. Does a reference exist for it as well?

Thanks.

Hi Conan,

You can use a schema.ini file instead of an import specification.
schema.ini must be placed in the same folder as the file you're
importing (or the folder you're exporting to), and must have a section
headed with the exact filename.

Access will create a schema.ini file for you if you use a make-table
query to export to a text file, e.g.
SELECT * INTO [text;database=C:\temp].[mytable#txt] FROM mytable;
or if you export to Microsoft Word mailmerge format, or if you use the
ODBC control panel to set up the text file as a data source.

See also:
Create a Schema.ini file based on an existing table in your database:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;155512
How to Use Schema.ini for Accessing Text Data
http://support.microsoft.com/default.aspx?scid=kb;EN-US;149090

Documentation for Schema.ini is towards the end of the Help topic
"Initializing the Text Data Source Driver" (under Microsoft Jet SQL
Reference in Help Contents).

Hello all,

MS Access' (2002) VBA help files says "To create a schema file, you can use the text import/export wizard to create the file." for
the TransferText Method.

I've looked all over on how to create schema.ini files. Searching MS Access Help files just breifly mentions schema.ini files, but
says nothing on creating them nor gives any examples. I see nothing in the Import Wizard dialog boxes that would allow me to
save/create a schema.ini file.

I already have an Import specification created and saved (that is different than a schema.ini file though, correct?!?).

How do I create one? If I have to create it from scratch (typing it out in Notepad), is there any examples out there that I can
model it after?

Thanks for any help anyone can provide,

Conan Kelly
 
J

John Nurick

Standard Jet SQL syntax requires names that contain special characters
to be delimited with brackets, not apostrophes:
...FROM [GL Transactions];

I am trying to use the make-table query to export the schema to a file. I
keep getting an error. My Select statement is

SELECT * INTO [text;database=C:\Work].[GL_Transactions#txt]
FROM 'GL Transactions';

I get an "Incomplete query" syntax error.

I just want to dump the schema to a text file. The table name is GL
Transactions. What is wrong with the syntax?
 
M

MikeV06

I think I tried that as well, but am not sure. I just took out the space
and quotes and it worked. Thanks though.

BTW, are you aware that if you export a view to a flat file as a table that
Access automatically creates the schema.ini.

Mike.

Standard Jet SQL syntax requires names that contain special characters
to be delimited with brackets, not apostrophes:
...FROM [GL Transactions];

I am trying to use the make-table query to export the schema to a file. I
keep getting an error. My Select statement is

SELECT * INTO [text;database=C:\Work].[GL_Transactions#txt]
FROM 'GL Transactions';

I get an "Incomplete query" syntax error.

I just want to dump the schema to a text file. The table name is GL
Transactions. What is wrong with the syntax?
 

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