schema.ini, cannot set data types

  • Thread starter Thread starter David McDivitt
  • Start date Start date
D

David McDivitt

I have used schema.ini files many times. Usually they work really neat. For
an application I am exporting info from a web application. Various files are
written to a folder on the desktop. In the folder I have an MSAccess 97
database which writes out a schema.ini then links all the tables through
code.

Everything was working except one table. The text file was empty. So in the
java app I had it write a dummy row. I was not able to get it to honor data
types specified in the schema.ini for that table. It kept making the
currency data type a text data type, even if the dummy column contained
"0.0". As I said everything was working except that table. All fields in all
comma delimited files were surrounded with quotes regardless of type. To see
what happened I changed the export to not put quotes on numeric fields,
which really screwed it up. Following, each field not having quotes was
shown as NUMERIC, and everything else TEXT 255. Now that I've put everything
back on both the java app and schema.ini, I am unable to make it work like
it used to. Everything is still NUMERIC and TEXT 255.

The column header parameter in scheme.ini never made any difference. I could
set it to true or false, and it always took field names from the first row.
It did use text field lengths and other data types from schema.ini, though.
Weird.

Ideas would appreciated. Thanks
 
From: David McDivitt said:
Date: Wed, 25 Jan 2006 16:29:19 -0600
Lines: 1

I have used schema.ini files many times. Usually they work really neat. For
an application I am exporting info from a web application. Various files are
written to a folder on the desktop. In the folder I have an MSAccess 97
database which writes out a schema.ini then links all the tables through
code.

Everything was working except one table. The text file was empty. So in the
java app I had it write a dummy row. I was not able to get it to honor data
types specified in the schema.ini for that table. It kept making the
currency data type a text data type, even if the dummy column contained
"0.0". As I said everything was working except that table. All fields in all
comma delimited files were surrounded with quotes regardless of type. To see
what happened I changed the export to not put quotes on numeric fields,
which really screwed it up. Following, each field not having quotes was
shown as NUMERIC, and everything else TEXT 255. Now that I've put everything
back on both the java app and schema.ini, I am unable to make it work like
it used to. Everything is still NUMERIC and TEXT 255.

The column header parameter in scheme.ini never made any difference. I could
set it to true or false, and it always took field names from the first row.
It did use text field lengths and other data types from schema.ini, though.
Weird.

Ideas would appreciated. Thanks


I found my problem. The file I was writing was scheme.ini, not schema.ini. I
don't know how much time I wasted on that. No wonder I had intermittent
functionality.
 

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

Similar Threads


Back
Top