ADO.net, asp.net & Bulk Copy
- From: "Elton W" <anonymous@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 13 May 2005 10:15:47 -0700
> 1. Is there a way of uploading a file to the sql
server from another PC?
Yes. You can use bulk insert text file to Db:
command.CommandText = "BULK INSERT db_table_name
FROM 'filepath\filename' WITH
(DATAFILETYPE = 'char', FIELDTERMINATOR = ',',
ROWTERMINATOR = '\n')"
command.ExecuteNonQuery()
> 2. Is it possible to manipulate the data before
bulk inserting?
Yes. But you need read data to datatable first.
> 3. Is it possible to just bulk insert the data
from a Data Table/ Data Set?
In ADO.NET 2.0, SqlBulkCopy can write dataset to db
directly. In ADO.NET 1.X, you need implement your code.
Look at following URL
http://support.microsoft.com/kb/315968/EN-US/
HTH
Elton Wang
elton_wang@xxxxxxxxxxx
>
> Thank you
> Francis
>.
>
.
- Follow-Ups:
- Re: ADO.net, asp.net & Bulk Copy
- From: Francis
- Re: ADO.net, asp.net & Bulk Copy
- References:
- ADO.net, asp.net & Bulk Copy
- From: Francis
- ADO.net, asp.net & Bulk Copy
- Prev by Date: simple row at a time data access
- Next by Date: Re: Parameters Question
- Previous by thread: ADO.net, asp.net & Bulk Copy
- Next by thread: Re: ADO.net, asp.net & Bulk Copy
- Index(es):