2

I am having quite a bit of trouble getting entity framework 5 to work with Informix. Looking for any help that I can get. I followed the following procedure:

  1. Installed the client SDK (I was unable to install clientsdk.3.70.FC7DE due to an apparent incompatibility with the InstallAnywhere installer and Windows 8, at the recommendation of a colleague I installed clientsdk.3.50.FC9)
  2. Verified the connectivity to the database via ODBC
  3. Verified connectivity using the testconn40.exe tool.
  4. Added the following connection string:

    <add name="OpenNet"
        connectionString="Database=*****;
          Server=*****:40411;User ID=*****;Password=******;Persist Security
          Info=True;Authentication=Server;" providerName="IBM.Data.Informix"/>
    

When I try to query the database, I get a System.Data.ProviderIncompatibleException with the following message: "A null was returned after calling the 'GetService' method on a store provider instance of type 'IBM.Data.Informix.IfxFactory'. The store provider might not be functioning correctly."

I de-compiled IBM.Data.Informix.IfxFactory and found the following :

Type type = Type.GetType("IBM.Data.Informix.Entity.IfxProviderServices,  
                 IBM.Data.Informix.Entity, Version=9.7.4.4, 
                 Culture=neutral, PublicKeyToken=7c307b91aa13d208", false);

I can't find an assembly for IBM.Data.Informix.Entity anywhere. Perhaps it was included in the later clientsdk.3.70.FC7DE version that I can install. Can anyone tell me if this is going to be possible or if I went down the wrong track at some point?

2 Answers 2

3

Right now the only way to get Entity Framework support for IBM database servers are by using IBM DB2 entity provider. IBM DB2 entity provider can connect to both DB2 and Informix servers.

The IBM DB2 entity provider is part of IBM Data Server Driver package. IBM Informix Client SDK also bundles IBM Data Server Driver package as an optional installation module. Please use the name space IBM.Data.DB2 instead of IBM.Data.Informix.

FYI: IBM DB2 Provider uses DRDA protocol; so it cannot connect to native (SQLI) port of Informix server. Please enable DRDA protocol at Informix server and specify that port number in the connectivity.

2
  • When I switch to the DB2 Provider I get a SQL1159N Error with Reason Code 7 and no additional information. publib.boulder.ibm.com/infocenter/db2luw/v9/index.jsp?topic=/… only lists 6 Reason Codes. Could this be an indication that DRDA is not installed on the server?
    – sanbornc
    Mar 11, 2013 at 18:51
  • Or perhaps I need to change the connection string beyond just specifying a new provider?
    – sanbornc
    Mar 11, 2013 at 20:35
1

The URL that you have pointed is for an old release, Doc from relatively new release will have updated information about the Reason Code 7. http://publib.boulder.ibm.com/infocenter/db2luw/v9r5/topic/com.ibm.db2.luw.messages.sql.doc/doc/msql01159n.html

The Reason Code 7 on this error is related "Registry key error". Even that information doesn't give much clue for me to give you help; but it will give a clue for DB2 DS Driver development team members. I will pass this forum posting information to the DB2 DS Driver development team; so that they can help you resolving the issue.

Most likely the error SQL1159N will get resolve by reinstalling the DS Driver package, you may try that as well.

Here is an FAQ URL for DB2 .NET. http://www.ibm.com/developerworks/wikis/display/DB2/DB2%20and%20.NET%20FAQs

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.