473,473 Members | 1,419 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

SqlBulkCopy problem

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


Jun 22 '06 #1
1 4466

"GB" <v7****@hotmail.com> wrote in message
news:1yFmg.82062$771.14333@edtnps89...
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

Jun 23 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Oscar Thornell | last post by:
Hi, I am trying to enlist an instance of SqlBulkCopy into a transaction. When I executes and try to write to the database IŽll get an exception indicating a transactional deadlock. ...
0
by: Cwappy | last post by:
I have a class that builds a DataTable and then, when the process is exiting, tries to write that DataTable to SQL Server 2000 via the SqlBulkCopy class. I know the process is exiting because I'm...
1
by: harleedavidson | last post by:
Using SqlBulkCopy.WriteToServer to upload a datatable and getting: System.Data.SqlClient.SqlException Line 1: Incorrect syntax near 'COLLATE'. Database Server is SQL2000, database in in 6.5...
4
by: Chris | last post by:
I have created a datatable from a csv file. One of the columns is an integer which sometimes can be blank. When it is blank I add a dbnull.value to the column when I add to the datatable. This...
5
by: TheSteph | last post by:
Using : MS-SQL 2005 / .NET 2.0 / VS2005 I have two server with the same database def but different data. I would like to import data from Server2.TableA to Server1.TableA. If a row doesn't...
1
by: Dave | last post by:
I'm using the SqlBulkCopy object to bulk insert large DataTable's into SQL Server. Its working well except tables with IDENTITY columns in them. When calling...
2
by: Amar | last post by:
Hi, I need to insert a large amount of records pretty frequently through my application. The quickest way to achive this seems to be SQLBulkcopy class. I have implemented the solution using the...
1
by: Sergey Zenyuk | last post by:
In VB.net windows application I use following code implementing SqlBulkCopy import: Using connODBC As New OdbcConnection(ConnStrODBC) connODBC.Open() Dim dbcmd As New OdbcCommand(String....
3
by: SteveB | last post by:
Hi All, Using the SQLBulkCopy for big CSV files consumes almost all the memory in the computer. I found how to resolve this problem while google that, but no code was added. The person claimed...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.