472,093 Members | 2,481 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,093 software developers and data experts.

A97 Import from CSV via ASP page

Hi all.

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

TIA for your assistance.

Nov 12 '05 #1
0 1285

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

15 posts views Thread by DesignGuy | last post: by
2 posts views Thread by s.hong | last post: by
4 posts views Thread by Bruce W. Roeser | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.