Re: ADO.net, asp.net & Bulk Copy
- From: "Elton W" <EltonW@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 16 May 2005 06:40:04 -0700
Members of the bulkadmin role are allowed to execute the BULK INSERT
statement. So you need to add the user to the Fixed server role.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adminsql/ad_security_6ndx.asp
HTH
Elton Wang
"Francis" wrote:
> Hi,
> Thanks for the reply. Just trying that out now, but getting the error:
> "You do not have permission to use the BULK INSERT statement" although I
> am setup as db_owner.
> Thanks for your help.
>
>
> Elton W wrote:
> >> 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
> >>.
> >>
>
.
- References:
- ADO.net, asp.net & Bulk Copy
- From: Francis
- ADO.net, asp.net & Bulk Copy
- From: Elton W
- Re: ADO.net, asp.net & Bulk Copy
- From: Francis
- ADO.net, asp.net & Bulk Copy
- Prev by Date: Re: Reading the access Db remarks & Field type .
- Next by Date: Re: MSDE Backup
- Previous by thread: Re: ADO.net, asp.net & Bulk Copy
- Next by thread: How to write a file into Blob column using ODP.NET
- Index(es):
Relevant Pages
|