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
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