Sorry for cross-posting, but I had no replies in comp.databases.ms-access;
hope somebody can help with this here :-)
I have to import a CSV file (made by the user with Excel) into an A97 table.
This is the code I use in my ASP page (NT4.0 Server/IIS4):
sql = "INSERT INTO ImportTable SELECT * FROM [Text;Database=" & FilePath &
";HDR=" & hd & ";FMT=Delimited].[" & FileName & "]"
It works, but I have a little problem that is driving me crazy: one of the
fields is a phone number and I'm unable to preserve the leading zero.
Note that:
- all the fields in the import table are defined as text;
- the CSV does contain the leading zero;
- if I import manually in A97 (File/Get External Data) the same CSV it works
correctly.
TIA for your assistance.
Alessandro
Export the Access table as text, look for schema.ini
in the import/export folder, edit schema.ini so that the
field is defined as a text field, see if that helps.
(david)
"Alex NSB" <ale...@tin.it> wrote in message
news:c60tiv$qa5$1...@newsread.albacom.net...
thank you for your reply.
> CSV is not a defined standard: every version is different.
Do you think another format would be more appropriate? What I really need is
a format that can be *easily* (using Word, Excel or other standard tools)
produced by the end user.
> Export the Access table as text, look for schema.ini
> in the import/export folder, edit schema.ini so that the
> field is defined as a text field, see if that helps.
Forgive me, but I fail to see how this could help solve my *web import* in
Access... Where should I put this schema.ini, on my web server? Am I missing
something?
Alessandro