Importing text with TransferText. It can't see my Schema.ini file

M

Max Moor

Hi All,
I'm trying to import a text file "Contacts.csv". I've switched
methods, and am now trying to use the TransferText method. I've created
a schema.ini file, and placed it in the same directory as the file to be
imported. (Some of the schema file is below)

I'm not sure how to tell the TransferText method to use the schema
file. If I leave that argument blank, I know the schema isn't being
used, because I get a numerical error on a column I've specified as
text.

I've tried to put both the filename (schema.ini) or the full path
and filename (C:\Temp\schema.ini) as the specification name argument,
but it errors messages that the file doesn't exist.

Interestingly enough, to form the string with the full path, I
have to use double backslahes, "\\", or they don't display in the error
message. I also have noticed that there seems to be a limit as to how
many characters I'm allowed to use in that argument (70'ish), making me
think that a path to a file isn't the right thing anyway.

Can anyone enlighten me?



schema.ini
--------------------
[Contacts.csv]
ColNameHeader=False
Format=CSVDelimited
MaxScanRows=0
CharacterSet=OEM
Col1=F1 Text
Col2=F2 Text
Col3=F3 Text
Col4=F4 Text
Col5=F5 Text
Col6=F6 Text
Col7=F7 Text
Col8=F8 Text
Col9=F9 Text
 
M

Max Moor

Never mind!!! :)


I've been working in dense mode. I finally saw that putting a schema.ini
file in the directory was for fixed length files. I've since gone into the
wizard, and defined the specs I needed. I've used the names of those
stored specs as the argument to TransferText. Darned if it doesn't work
just fine.


Thanks anyway,

Max
 

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