Re: Import comma delimited file
- From: Bullschmidt <paul@xxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 07 Sep 2005 19:17:35 -0700
You can connect to a csv file (which can be opened in Excel and which an
Excel file can be converted into) in good form just as you can to a
regular database.
The .csv file needs to be uploaded to the server.
And you can have two recordsets open at the same time.
So I'd suggest going through this recordset one row at a time and within
this loop add a new record to the "real" database's recordset.
And for help connecting to a text file using the Jet OLE DB provider:
http://www.carlprothman.net/Default.aspx?tabid=87#OLEDBProviderForTextFi
les
And based on the above link realize that the actual filename does NOT go
in the connection string - rather it goes in the SQL statement
(definitely a little tricky).
Best regards,
J. Paul Schmidt, Freelance ASP Web Developer
http://www.Bullschmidt.com
ASP Design Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...
<<
I've been asked to develop an automated type situation where we have a
database table (sql server) and periodically, there will be a comma
delimited file from which we need to import the data, replacing the old.
I naurally know that we can use [truncate tablename] to kill the other
data,
but does anyone have any examples of importing a comma delimited file
into
SQL Server?
>>
*** Sent via Developersdex http://www.developersdex.com ***
.
- Prev by Date: Re: ASP to EXCEL
- Next by Date: Re: Strange delay behaviour
- Previous by thread: Re: ASP to EXCEL
- Next by thread: Controlling field sizes of a table created with response.write
- Index(es):
Relevant Pages
|