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 :
:
My current window :
Notes:
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 :
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 :
IBM® Informix® is a fast and scalable database server that manages traditional relational, object-relational, and dimensional databases. Its small footprint and self-managing capabilities are suited to embedded data-management solutions.
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 …
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
.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.
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
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());
}
}
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.
Here some more details on how the connection was configured in the ODBC Data Source Administration tool:
EDIT 2: The 32-bit Client SDK produces the very same results as shown before.
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).
Then create a User Data Source as below, using your driver and DB information:
And finally, in Visual Studio, your newly created Data Source should be available:
I don't have a server i could use to test this any further, but again, you could give it a try.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With