JDBC : Functions in SQL statements
Posted in 1999
Topics: Connectivity: ODBC / JDBC / .NET, Java & JDBC Development
I am using : Informix JDBC Driver 2.0 Type 4 connecting to Informix Dynamic Server 7.3. When i try to use an function in a SQL statement i get an error unable to resolve routine. I use the methods prepareStatment & executeQuery. I have also tried using the Escape sequence given in the JDBC help file, but it doesnt work. Any suggestions on how to use function calls in SQL. Thx Sunil * Sent from AltaVista http://www.altavista.com Where you can also find related Web Pages, Images, Audios, Videos, News, and Shopping. Smart is Beautiful
Can you please post your exact java code? Cheers-- Charles Sunil <siyerNOsiSPAM@saba.com.invalid> wrote in message news:1415c574.effa8c90@usw-ex0110-076.remarq.com... > I am using : Informix JDBC Driver 2.0 Type 4 connecting to > Informix Dynamic Server 7.3. > > When i try to use an function in a SQL statement i get an > error unable to resolve routine. I use the methods > prepareStatment & executeQuery. > > I have also tried using the Escape sequence given in the > JDBC help file, but it doesnt work. > > Any suggestions on how to use function calls in SQL. > > Thx > > Sunil > > > * Sent from AltaVista http://www.altavista.com Where you can also find related Web Pages, Images, Audios, Videos, News, and Shopping. Smart is Beautiful
Sunil wrote: > I am using : Informix JDBC Driver 2.0 Type 4 connecting to > Informix Dynamic Server 7.3. > > When i try to use an function in a SQL statement i get an > error unable to resolve routine. I use the methods > prepareStatment & executeQuery. > > I have also tried using the Escape sequence given in the > JDBC help file, but it doesnt work. > > Any suggestions on how to use function calls in SQL. > > Thx > > Sunil > > * Sent from AltaVista http://www.altavista.com Where you can also find related Web Pages, Images, Audios, Videos, News, and Shopping. Smart is Beautiful Sunil, I assume that the Informix error code associated with the error message you say you're getting is -674. Output of command 'finderr -674' shown below ... ========================================================================== -674 Routine <routine-name> can not be resolved. You called a routine that does not exist in the database, or you do not have permission to execute the routine. If you invoke a routine and your application or another application drops the routine before you execute a prepared statement, you receive this error. Check that the name of the routine is correct and that you have permission to execute the routine. For a prepared statement that refers to the routine, make sure that it is still running when you execute the statement. ========================================================================= It would appear the problem is in the database and not related to JDBC Check that the function exists in the database. If it does, you may be calling the function with the wrong number or types of parameters. Of-course supplying some code would greatly help others to really pinpoint the cause of your problem :-) HTH, Avi. -- /\\ \\ /| Avi Abrami, Analyst/Programmer, Telegate Ltd. /__\\ \\ / | 7 Haplada Street, Or-Yehuda, ISRAEL / \\ \\/ | Phone:+972-3-5388717 Fax:+972-3-5335877 eMail:avia@telegate.co.il