Connecting to Informix

  • Thread starter Thread starter Mark
  • Start date Start date
M

Mark

We need to connect to an in-house informix database from a .NET web
application. Any recommendations on:

1. Drivers.
2. Connection strings.
3. Ways to optimize speed?

This particular app will be just retrieving and displaying data. No
inserts/updates/etc.

Thanks in advance.

Mark
 
Mark,

DataDirect provides a managed provider for connecting to an Informix
database. You can also most likely connect through OLE DB, which means that
you can use the classes in the System.Data.OleDb namespace to connect to the
data.

Once you choose one of those (which follows the pattern set out for the
framework for data access), accessing the data is pretty much all the same.
What you would do is:

- Create a connection
- Create a command for the select
- Attach connection to the command
- Attach the command to a DataAdapter
- Open the connection
- Fill a dataset
- Close the connection, command, and data adapter.

For a more detailed explanation of how to do this, check out the section
of the .NET framework titled "Introduction to Data Access with ADO.NET",
located at (watch for line wrap):

http://msdn.microsoft.com/library/d...nfundamentaldataconceptsinvisualstudionet.asp

Hope this helps.
 
We need to connect to an in-house informix database from a .NET web
application. Any recommendations on:

1. Drivers.
2. Connection strings.
3. Ways to optimize speed?

This particular app will be just retrieving and displaying data. No
inserts/updates/etc.

I had to do this about a year ago. It involved installing a Win32 middleware
app on the IIS box, which included the ODBC drivers. It was to connect to a
legacy Informix DB running on UNIX, and no matter how hard I tried, I just
couldn't get the damn thing to connect via OleDb. ODBC was good enough,
though, because there was no realtime querying - just nightly data
exchanges, so performance wasn't really an issue.

This will give you examples of connection strings for OleDb & ODBC
http://www.connectionstrings.com/

Of course, if you can find a native .NET data provider which works, that
will almost certainly give you the best performance. IBM have released one,
but you'll need to check whether it will work with your particular version
of Informix.
http://weblogs.asp.net/adweigert/archive/2004/03/22/93909.aspx
 
Back
Top