Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hi, Does anyone know how to use

Status
Not open for further replies.

oraclec

Programmer
Dec 8, 2002
16
0
0
SG
Hi,

Does anyone know how to use ASP to read data from a csv file and do an INSERT into SQL Server 2000 database? Both my csv file and sql db allows null values in their columns.

I went to this link: (reads from csv file and writes to HTML page ~ I figured would be similar to writing to SQL Server)
and tried the method, but got these funny characters ÐÏࡱá displayed on my HTML page instead.


|*~Oraclec~*|
 
oraclec,

You are looking at this the wrong way. Don't use the ASP to read the file and then Insert it into SQL Server, simply create a SProc on the server, with a single parameter for the file path, and call the SProc from the ASP passing the filepath as the parameter.

The Sproc can do the rest and return a success or failure code to the ASP when done.

Logicalman
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top