Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3502
  • Last Modified:

SQL String is not Query Error 17128

Hi all,

Trying to track this guy down, just can't find any documentation on this...  On top of it all, not really sure which piece of technology the problem is stemming from... but we'll start here.

Using Oracle 9, Oracle 9IAS, Jakarta Struts (java/jsp) on a web application.  JDBC/Struts connection pool for database access.  When trying to do certain UPDATE statements to the database, I get the following error returned from the:

java.sql.SQLException.getMessage()=
SQL string is not Query

java.sql.SQLException.getSQLState()=
null

java.sql.SQLException.getErrorCode()
17128


The SQL statement that got the error is:

UPDATE usertable SET    
lastlogin_id  = 10000,       passwordstatus = 'X',       transcontrol  = 33797598+1 WHERE loginid   = 'logname'

I was able to run this SQL statement manually without a problem.

This is happening in consistently several places, but not everywhere.  Some areas of the app work, some don't.

Small twist - The application works 100% when running on Oracle 8, Tomcat, and Struts.  We are only having the problem on the 9IAS server and Oracle 9 database, and only in some areas of the app.

Can't find any documentation anywhere on this error that makes any sense.  Any ideas on what the problem is and how to fix?

Thanks for any help!





0
pbguy
Asked:
pbguy
  • 3
  • 2
1 Solution
 
vzilkaCommented:
Are you using statement or prepared statement?
Can you try prepared statement and see what happens?
Can you describe the areas of the application where this doesn't work?
0
 
pbguyAuthor Commented:
Using a statement, any idea of why a prepared statement might work?  

I can make the change, but it will take a while to get results (I don't have access to the 9IAS app server for testing purposes ... don't ask ... but anyway, I need to make the change, test it in Tomcat, build the WAR file, fill out paperwork in triplicate, ship it off, and then I can test it on the 9IAS server in about 3 days later... ain't technology great?)  

Anyway, I will try it, just want to get all possible options together so I can send them all out at once...

What's weird is the areas that it doesn't work in are almost exactly the same as the areas it works in, i.e., create the SQL string, create the statement, execute() the statement, etc.  Makes no sense...

Are you able to find any documentation on the error?  What is it trying to tell us?

Thanks vzilka, keep any ideas comin...







0
 
vzilkaCommented:
I am thinking maybe on incorrect parsing of the SQL statement is done by the driver.
What driver are you using? OCI? thin? Is it the same driver as the one Tomcat uses? Since it is not the same Oracle DB version, I hope you use the correct classes12.zip file.
Can you post the method code here?
0
 
pbguyAuthor Commented:
Uh oh... didn't think that they may need different drivers...

I'll download the classes12.zip for Oracle 9 and ship it off...

Using the thin driver, yes the same one we're using with Tomcat (hence the "uh oh... :)

I'll post the code tomorrow.  Thanks v!








0
 
pbguyAuthor Commented:
Hi vz,

Just wanted to give you an update and the final solution.

Indeed, I was not using the latest Oracle drivers for 9.  We downloaded the classes12.jar, but it did not solve the problem.

What did solve the problem was the way the problem files were executing the SQL staements - they were using executeQuery() instead of execute().  I looked at the darned methods 10 times and didn't see it until I was preparing the code to be posted here.  Though technically wrong, it was never a problem in Oracle 8 but it don't work in Oracle 9 (still trying to figure out what the difference could be ... must be some backend stuff ya just don't see...)

Anyway, I changed the code in the 3 places we were having the problem, wen through the red tape, tested it and it works. Hours of fun!

Thanks again .. got it cause of your help, u get the points.  Take care

0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now