A
Alex NSB
Hi all.
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
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