3

Is there any way to use the SqlBulkCopy class with Informix database, or any alternative, because really I need this class behavior with my Informix database.

What I try to do is described in SO 6856004.

EDIT :

I don't find IfxBulkCopy at all.

enter image description here

Community
  • 1
  • 1
Anyname Donotcare
  • 11,113
  • 66
  • 219
  • 392

1 Answers1

1

There appears to be an IfxBulkCopy class in the ADO.NET provider for Informix. The class documentation is here:

http://publib.boulder.ibm.com/infocenter/idshelp/v111/index.jsp?topic=/com.ibm.net_cc.doc/dqx1db2bulkcopyclass.htm

If their provider is a good one, the usage of this class should be very similar, if not the same, as the SqlBulkCopy class available for SQL Server. This will likely mean it takes a DataTable or an IDataReader implementation to WriteToServer.

Bear in mind it is housed within the "IBM Data Server Provider for .NET", which might be different to where the standard ADO.NET provider stuff is housed.

Adam Houldsworth
  • 63,413
  • 11
  • 150
  • 187
  • Thanks a lot . I use `using IBM.Data.Informix;` but it doesn't appear at all in this name space. I added reference to this dll . I get this error `The type or namespace name 'IfxBulkCopy' could not be found (are you missing a using directive or an assembly reference?` all the time. – Anyname Donotcare Aug 17 '11 at 12:56
  • Please , help , if you have the dll that contains this class .or any solution to my main problem i will be grateful. – Anyname Donotcare Aug 17 '11 at 12:57
  • 1
    @just_name I noticed that the `IfxBulkCopy` class appeared to be in a package called "IBM Data Server Provider for .NET", try downloading that. According to the documentation in the link, it should be in a DLL called IBM.Data.Informix.dll. – Adam Houldsworth Aug 17 '11 at 12:57
  • yeah i see it in the documentation but i can't find it. please look to the image in my question. – Anyname Donotcare Aug 17 '11 at 13:04
  • Please give me the link to the correct version of this dll , which contain this class. – Anyname Donotcare Aug 17 '11 at 13:05
  • 1
    @just_name you need to make sure that the DLL you have referenced is the correct one. In the references list, if you double-click the reference it should open the Object Explorer for you. Review the namespace in here to see if it's available. If not, then you've got the wrong DLL or the wrong version. I don't know what the correct version is, other than saying "the latest". I just did a web search to find the class, I don't actually develop against this database. – Adam Houldsworth Aug 17 '11 at 13:06
  • hmmm . thanks a lot. it doesn't have this class. i don't know why ?! – Anyname Donotcare Aug 17 '11 at 13:10