SqlBulkCopy problem

G

GB

Hello:
I am developing C# project, using ADO .NET 2.0 to connect to SQL Server
2005.
I created a DataTable from scratch, and then use SqlBulkCopy to insert it
into an empty table in a SQL Server 2005 table.
The datatable I created from scratch matches exactly the empty SQL Server
2005 table.

However, when this runs I get the error:

Exception {"OLE DB provider 'STREAM' for linked server '(null)' returned
invalid data for column '[!BulkInsert].MyField. "} System.Exception
{System.Data.SqlClient.SqlException}

But for SQL Server 2000 everything is OK!

Could you please give me a hint how to fix the problem?

Thanks,
GB
 
D

David Browne

GB said:
Hello:
I am developing C# project, using ADO .NET 2.0 to connect to SQL Server
2005.
I created a DataTable from scratch, and then use SqlBulkCopy to insert it
into an empty table in a SQL Server 2005 table.
The datatable I created from scratch matches exactly the empty SQL Server
2005 table.

However, when this runs I get the error:

Exception {"OLE DB provider 'STREAM' for linked server '(null)'
returned
invalid data for column '[!BulkInsert].MyField. "} System.Exception
{System.Data.SqlClient.SqlException}

But for SQL Server 2000 everything is OK!

Could you please give me a hint how to fix the problem?

Don't multipost. See response in sqlserver.programming.

David
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top