Hi All,
Does anyone know about a managed API that would allow me to bulk copy data
into a SQL table using the native bcp format?
I did some research and found:
- SqlBulkCopy class (AD.net 2.0)
[url]http://msdn2.microsoft.com/en-us/library/system.data.sqlclient.sqlbulkcopy.aspx[/u
rl]
this does not seem to support the native bcp format.
- SQL-DMO bulkcopy object
supports native bcp format but is unmanaged code.
- surprisingly the new sql2k5 SMO does not seem to have any support for
bulkcopy (did I miss anything?)
Thanks in advance
--
Vikram Vamshi
Database Engineer
Eclipsys Corporation> Does anyone know about a managed API that would allow me to bulk copy data
> into a SQL table using the native bcp format?
Consider a BULK INSERT Transact-SQL statement (invoked via SqlClient) or
create a SSIS package programmatically containing a BulkInsert task
(Microsoft.SqlServer.Dts.Tasks.BulkInsertTask.BulkInsertTask) to import
native format files.
If you need to create a native format file from managed code, I don't know
of a method to do that directly. Unless someone else chimes in with a
better suggestion, you could launch the BCP command-line utility from your
code to create a native file.
Hope this helps.
Dan Guzman
SQL Server MVP
"Vikram Vamshi" <vikram.vamshi@.online.eclipsys.com> wrote in message
news:ucP4QtTSHHA.5012@.TK2MSFTNGP04.phx.gbl...
> Hi All,
> Does anyone know about a managed API that would allow me to bulk copy data
> into a SQL table using the native bcp format?
> I did some research and found:
> - SqlBulkCopy class (AD.net 2.0)
> [url]http://msdn2.microsoft.com/en-us/library/system.data.sqlclient.sqlbulkcopy.aspx[
/url]
> this does not seem to support the native bcp format.
> - SQL-DMO bulkcopy object
> supports native bcp format but is unmanaged code.
> - surprisingly the new sql2k5 SMO does not seem to have any support for
> bulkcopy (did I miss anything?)
> Thanks in advance
> --
> Vikram Vamshi
> Database Engineer
> Eclipsys Corporation
>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment