How to find informix datasource in visual studio to connect to
Asked Answered
S

3

18

I want to use EF6 with Informix database .

I have searched a lot and find that i can get

EntityFramework.IBM.DB2 6.0.2 from NuGet for Both Informix and DB2 but my main problem is the connection

How to create a connection to my informix database i can't find any provider for .net to use ?

  • I want to get a window like this :

    :enter image description here

My current window :

enter image description here


Notes:

  • I use the informix server version : IBM Informix Dynamic Server Version 12.10.FC3
  • I use the informix client SDK version : 3.50
  • I use Visual studio 2012
  • .net framework 4.5

EDIT :according to the recommendations: I run C:\Windows\SysWOW64\odbcad32.exe

and configure my ODBC but still unable to access the informix DB through V.S :

enter image description here enter image description here enter image description here


EDIT2: According to the recommendation i have installed IBM Informix Software Bundle and able to connect to visual studio through View -->Server Explorer and find all the tables .but still can't find the informix odbc when i try to change the data source through Entity framework like this : enter image description here enter image description here enter image description here enter image description here

Signalize answered 25/10, 2015 at 10:2 Comment(6)
Did you try this ibm.com/developerworks/data/library/techarticle/…Skerrick
You need the following software to complete the example: IBM Data Server Driver for ODBC, CLI, and .NET (version 9.5.3 or later) IBM Database Add-ins for Visual Studio (version 9.5.3 or later) Visual Studio 2008 Service Pack 1 .NET Framework 3.5 Service Pack 1 www-01.ibm.com/support/docview.wss?uid=swg21385217Skerrick
I read all these articles and try to download the IBM Database Add-Ins for Visual Studio but the button I confirm doesnot do any action !!Signalize
its bug on them , you need to get Data provider to make this runSkerrick
@Eldho: i need direct link to the IBM Database Add-Ins for Visual StudioSignalize
@just_name: any success?Forney
N
4

EDIT 5: In order to get the exact same screens you're looking for and to be fully integrated with Visual Studio, with all the bells and whistles you're now demanding, you will need to install IBM Data Server .NET Provider for Informix, which does not have a Developer Edition. You can only get a Trial Version, which requires additional registration information besides that of a regular Developer Registration.

See detailed full information in the link below, including the exact same integration screens between Visual Studio and IBM Informix you're looking for: Get started with the IBM Data Server .NET Provider for Informix

enter image description here

EDIT 4: Code snippet testing the ODBC connection:

    private void Form1_Load(object sender, EventArgs e)
    {
        try
        {
            string connString = "Dsn=IFMX32;uid=informix";
            string cmd = "select * from syschfree";

            OdbcConnection conn = new OdbcConnection(connString);

            OdbcDataAdapter adapter = new OdbcDataAdapter(cmd, conn);

            conn.Open();

            DataTable table = new DataTable();
            adapter.Fill(table);

            dataGridView1.DataSource = table;
        }
        catch (Exception ex)
        {
            Debug.WriteLine(ex.ToString());
        }
    }

enter image description here

EDIT 3: I was able to establish an ODBC connection as explained before using the "bundle" package Informix Developer Edition for Windows 32 Version 12.10TC5DE which includes not only the client SDK but also a test server. As you can see in the picture below, i connected to the sysmaster database. Whether or not you need a test server, perhaps you should install this 32-bit bundle package because it may be installing some additional components that would enable you to get connected.

enter image description here

Here some more details on how the connection was configured in the ODBC Data Source Administration tool:

enter image description here

EDIT 2: The 32-bit Client SDK produces the very same results as shown before.

enter image description here

EDIT 1: You may want to give this a try:

Assuming your client SDK is properly installed, then you should be able to see your driver as shown below. In my case, version 4.10 Developer Edition (64-bit).

enter image description here

Then create a User Data Source as below, using your driver and DB information:

enter image description here

And finally, in Visual Studio, your newly created Data Source should be available:

enter image description here

I don't have a server i could use to test this any further, but again, you could give it a try.

Norbertonorbie answered 8/11, 2015 at 16:33 Comment(12)
Could you look to my question with the new edit please?Signalize
did you try the last step, which is to add the connection in VS? What error do you get? I noticed from your print screen that you're missing Microsoft ODBC Data Source option...Norbertonorbie
Please see EDIT 3 in my post.Norbertonorbie
Could you provide a direct link to Informix Developer Edition for Windows 32 Version 12.10TC5DE ? should i uninstall any previous installations before this ? NOTE:My window is 64bitSignalize
Unfortunately, a direct link is not possible because you have to be a registered user in order to download. But it shouldn't be a problem at all, just register. Anyway, the download page is this IBM - DeveloperWorks - Informix. My machine is 64 bit as well. Definitely i would uninstall all previously installed packages to start it clean and eliminate any potential issues. That's what i did.Norbertonorbie
Thanks, Could you provide me a link to Informix Developer Edition for Windows 32 Version 12.10TC5DE cuz i cann't find it in the download link you provideSignalize
Try this: www-01.ibm.com/marketing/iwm/iwm/web/…Norbertonorbie
Please see EDIT 4.Norbertonorbie
I make EDIT2, could you look to the question please.Signalize
Creating an ADO.NET Entity Data Model is a step up in the ladder... Are you even able to connect to the database at all? How can you create a data model if you can't connect to the database? In your list of data sources, where's Microsoft ODBC Data Source ?Norbertonorbie
i can connect easily to my informix database i go to View --->Server Explorer--->Right click on Data Connections --->Add Connection --->Change the data source ---> Select Microsoft ODBC data source--->insert username & password --->Test Connection ---->Succeeded , When i try to change the data source through ADO.NET Entity Data Model i can't find Microsoft ODBC data source !!! it's so weird .Signalize
Please see EDIT 5.Norbertonorbie
F
6

Assuming the CSDK installation was successful, I suspect the 64-bit version of the ODBC Administrator tool is running, while 32-bit IBM drivers were installed. 32-bit drivers will only be visible running the 32-bit version of the ODBC Administrator tool. Microsoft ships both 32- and 64-bit versions in their OS, but the 64-bit version is the one launched from the menus. (See this related question on Super User: https://superuser.com/q/419832).

You can run the 32-bit version from a command prompt:
  %windir%\SysWOW64\odbcad32.exe
When you go to add your DSN, you should see the IBM drivers, like in the XP screenshot you posted.

Also, make sure you either enter the full path or cd to the %windir%\SysWOW64 directory. Otherwise, you be launching the 64-bit version, which incidentally is also called odbcad32.exe.

EDIT
Visual Studio 2012 is only available as a 32-bit application. 32-bit applications won't see any data sources created with the default 64-bit ODBC Administrator tool.
Two important caveats …

  1. Make sure you are running the 32-bit ODBC Admin tool. If you simply type odbcad32.exe from a command prompt, you will be running the 64-bit version of the tool. Be sure to launch it using the full path: %windir%\SysWOW64\odbcad32.exe.
  2. If your data source is a system DSN, try creating it as a user DSN. There appears to be a problem for users seeing the system DSNs in the server explorer in VS 2012 and VS 2010.

EDIT 2
I've looked back through this and think there is still some missing requirement in your environment. The are quite a few client packages from IBM and you may very well need one of the packages that is more comprehensive than the "IBM Database Add-Ins for Visual Studio".

I would download and install the "IBM Data Server Client" found at http://www-01.ibm.com/support/docview.wss?uid=swg21385217. Per IBM's description …

This is the all in one client package and includes all the client tools and libraries available. It includes add-ins for Visual Studio.

I was able to download the IBM Data Server Client. Specifically, this is the one I chose.

IBM Data Server Client (Windows AMD 64)
ibm_data_server_client_winx64_V10.5.zip (576 MB)

Since this package was released on 2012-04-30, I would recommend applying the latest fix packs: http://www-01.ibm.com/support/docview.wss?rs=4020&uid=swg27016878

I don't think you want the IBM Informix .NET provider. See "Table 1" in this IBM tech article. The article also walks through connecting to Informix and using the Visual Studio Add-In.

Forney answered 29/10, 2015 at 21:55 Comment(10)
Thanks , i have done what you recommend but still can't see that dialog window in visual studio 2012 !!Signalize
Is your Visual Studio 64-bit?Forney
Have you tried a newer verion of the CSDK? The 4.10 version is compatible with your 12.10 version of IDS. (See www-01.ibm.com/support/knowledgecenter/#!/SSGU8G_12.1.0/…). There are both 64 and 32 bit versions available.Forney
How could i know if the V.S 64 bit or not ? My windows is 64-bitSignalize
Just figured out Visual Studio 2012 is 32-bit only. See: https://mcmap.net/q/299470/-visual-studio-2012-64-bit-duplicate. I have updated my answer accordingly.Forney
Could you look to my question with the new edit please?Signalize
Were you ever able to download the "IBM Database Add-ins for Visual Studio"?Forney
No, I want direct link to this add-insSignalize
I just downloaded the Add-ins plugin and didn't have any issue getting past the "I Confirm" button. I would give it a try again.Forney
I make EDIT2, could you look to the question please.Signalize
N
4

EDIT 5: In order to get the exact same screens you're looking for and to be fully integrated with Visual Studio, with all the bells and whistles you're now demanding, you will need to install IBM Data Server .NET Provider for Informix, which does not have a Developer Edition. You can only get a Trial Version, which requires additional registration information besides that of a regular Developer Registration.

See detailed full information in the link below, including the exact same integration screens between Visual Studio and IBM Informix you're looking for: Get started with the IBM Data Server .NET Provider for Informix

enter image description here

EDIT 4: Code snippet testing the ODBC connection:

    private void Form1_Load(object sender, EventArgs e)
    {
        try
        {
            string connString = "Dsn=IFMX32;uid=informix";
            string cmd = "select * from syschfree";

            OdbcConnection conn = new OdbcConnection(connString);

            OdbcDataAdapter adapter = new OdbcDataAdapter(cmd, conn);

            conn.Open();

            DataTable table = new DataTable();
            adapter.Fill(table);

            dataGridView1.DataSource = table;
        }
        catch (Exception ex)
        {
            Debug.WriteLine(ex.ToString());
        }
    }

enter image description here

EDIT 3: I was able to establish an ODBC connection as explained before using the "bundle" package Informix Developer Edition for Windows 32 Version 12.10TC5DE which includes not only the client SDK but also a test server. As you can see in the picture below, i connected to the sysmaster database. Whether or not you need a test server, perhaps you should install this 32-bit bundle package because it may be installing some additional components that would enable you to get connected.

enter image description here

Here some more details on how the connection was configured in the ODBC Data Source Administration tool:

enter image description here

EDIT 2: The 32-bit Client SDK produces the very same results as shown before.

enter image description here

EDIT 1: You may want to give this a try:

Assuming your client SDK is properly installed, then you should be able to see your driver as shown below. In my case, version 4.10 Developer Edition (64-bit).

enter image description here

Then create a User Data Source as below, using your driver and DB information:

enter image description here

And finally, in Visual Studio, your newly created Data Source should be available:

enter image description here

I don't have a server i could use to test this any further, but again, you could give it a try.

Norbertonorbie answered 8/11, 2015 at 16:33 Comment(12)
Could you look to my question with the new edit please?Signalize
did you try the last step, which is to add the connection in VS? What error do you get? I noticed from your print screen that you're missing Microsoft ODBC Data Source option...Norbertonorbie
Please see EDIT 3 in my post.Norbertonorbie
Could you provide a direct link to Informix Developer Edition for Windows 32 Version 12.10TC5DE ? should i uninstall any previous installations before this ? NOTE:My window is 64bitSignalize
Unfortunately, a direct link is not possible because you have to be a registered user in order to download. But it shouldn't be a problem at all, just register. Anyway, the download page is this IBM - DeveloperWorks - Informix. My machine is 64 bit as well. Definitely i would uninstall all previously installed packages to start it clean and eliminate any potential issues. That's what i did.Norbertonorbie
Thanks, Could you provide me a link to Informix Developer Edition for Windows 32 Version 12.10TC5DE cuz i cann't find it in the download link you provideSignalize
Try this: www-01.ibm.com/marketing/iwm/iwm/web/…Norbertonorbie
Please see EDIT 4.Norbertonorbie
I make EDIT2, could you look to the question please.Signalize
Creating an ADO.NET Entity Data Model is a step up in the ladder... Are you even able to connect to the database at all? How can you create a data model if you can't connect to the database? In your list of data sources, where's Microsoft ODBC Data Source ?Norbertonorbie
i can connect easily to my informix database i go to View --->Server Explorer--->Right click on Data Connections --->Add Connection --->Change the data source ---> Select Microsoft ODBC data source--->insert username & password --->Test Connection ---->Succeeded , When i try to change the data source through ADO.NET Entity Data Model i can't find Microsoft ODBC data source !!! it's so weird .Signalize
Please see EDIT 5.Norbertonorbie
L
1

Currently the Visual Studio integration and Entity Framework support is only by using IBM DS driver (IBM Data Server Client) which uses DRDA protocol. The drivers included with Informix Client SDK uses native protocol called SQLI. You may try after installing IBM DS Driver. Unfortunately the IBM DS Driver has limited functionality with Informix server.

Leaseback answered 13/2, 2018 at 19:26 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.