Informix+ODBC+ADO.NET - problem

  • Thread starter Thread starter Mad One
  • Start date Start date
M

Mad One

Hi!
I'm developing an application using informix DBMS and .Net. I came across
following problem, when I form a query with too many clauses in WHERE part
and try to execute it with Fill command I get an exception "Connection is
dead". Removing one of the clauses creates no problem at all. I have
Informix ODBC drivers ver. 3.33, before that version exception was "Error -
no info..". It isn't DBMS problem, because when I'm using non WinSQL with
the same query everything works fine.

//An example of a query, creating the problem:
SELECT k.winien AS konto, SUM(wartosc) AS wartosc_wn, 0 AS wartosc_ma ,
SUM(wartosc_w_walucie) AS wartosc_wn_wal, 0 AS wartosc_ma_wal, waluta AS
waluta
FROM ksiega_bis04 k
WHERE (k.d_dekretacji < 'A4/01/31' ) AND (k.d_dekretacji >= 'A4/01/01' )
AND (k.winien > '') AND ( stan = '0' ) AND (k.winien BETWEEN '201' AND
'202') GROUP BY winien, waluta

Thx in advance
Marek Aleksander Dabek
 
Marek,

It is hard for me to imagine why any problem with a select query would
cause a connection to go dead. I'm wondering if some problem between
the ODBC driver and your application is assuming that whatever went
wrong was the same as a dead connection.

There are some layers that could be peeled away. The ODBC driver
talks to the server; the (I'm assuming) Microsoft .Net Provider for
..Net, talks to the driver; I can't tell what might be above the .Net
provider (and, technically, there is the ODBC driver manager between
the Microsoft provider and the driver). You mention that the same
query runs when using something other than WinSQL; is that something
using the ODBC driver or is it something like Informix DBAccess? It
could be interesting to run the same query through ODBC Test (comes
with MDAC, in the samples).

However, that driver is pretty old. I'd try downloading and using the
latest CSDK (http://www.ibm.com/software/data/informix/downloads.html)
before spending too much time on problem isolation. Also, depending
on your needs, you may find the IBM Informix .Net provider that now
comes with the Client SDK a better solution than the ODBC bridge.

Luck,

Chris
 
Thanks for answer. I found workaround this problem. I'm just closing and
re-opening the db connection and there is no more dead connection exception.
However, that driver is pretty old. I'd try downloading and using the
latest CSDK (http://www.ibm.com/software/data/informix/downloads.html)
before spending too much time on problem isolation. Also, depending
on your needs, you may find the IBM Informix .Net provider that now
comes with the Client SDK a better solution than the ODBC bridge.

I've already been using the recent version of CSDK, and it contains this
version (3.33) of ODBC drivers. Sure I will use .NET provider, but in this
case I needed to use ODBC.

Marek Aleksander Dabek.
 
Back
Top