Re: Informix and JDBC
Posted in 1998
Hello,
I have tried this using the
PreparedStatement -> Prepare -> executeQuery -> getXXXX(1)
and it works for me (JDBC 1.22 UC1, I hope the version is right).
I didn't try yet the Statement way.
Kind Regards,
Octav
Jasvinder Singh wrote:
>Hi all,
>
>I am writing a Java Application that uses Informix-9.12
>
>I am encountering the following SQL problem
>
>The statement=20
>SELECT=A0MAX(research_material.paper_id) FROM research_material
>
>Works fine when executed from within dbaccess.
>
>The same statement throws=20
>
> -----SQLException caught-----
>Message: Column paper_id not found
>SQLState: null
>Message: 0
>
>when Executed from within my java code=20
>
>I find that=20
>SELECT paper_id FROM research_material=20>
>Works OK from my java code, but whenever I include ANY aggregate=20
>function ( MAX, MIN, COUNT or AVG - these are the ones I have tried -
>they all work from dbaccess but not from my java code!!!), I get the
>exception, column not found, thrown
>
>
>1) Can anyone explain why this happens? - is it something I have not
>done correct with the JDBC-Informix driver?
>2) Can anyone help reseolve this?
>
>
>
>Thanks..
>
>BTW Would it be posible for any responses to be sent to me as well as to
>the group!
>
>
>----
>
>=09
> " The best things in life are never rationed.=20
> Friendship, loyalty, love, do not require coupons. "=20
> --G.T. Hewitt=20
>
>
>Jasvinder Singh
>email: khalsa@cheerful.com=09
>URL: http://studentweb.cs.bham.ac.uk/~jsd/
--=20
Octav Chiriac Phone: (373) 2 21 20 96
NetInfo S.R.L. Fax: (373) 2 21 36 59
Chisinau (373) 2 24 00 83
Moldova, Republic of mailto:com@netinfo-moldova.com