Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem Facing in PrepareStatement

Status
Not open for further replies.

Annadurai

Vendor
Oct 8, 2003
1
SG
I am trying to excute the following query using preparestatement

Select EMP_NO,EMP_NAME,ADDRESS From db2t1.EMPLOYEE Where EMP_NAME like 'A%' FETCH FIRST 1000 ROWS ONLY

Some times it is giving the Error as "Caught SQL Exception : [IBM][CLI Driver][DB2] SQL0490N Number "0" directly specified in an SQL statement is outside the range of allowable values in this context ("1", "2147483647"). SQLSTATE=428B7".

Inside the Session Bean I am using the preparestatement.But When I use the Statement Object I won't get this error.

I check the error code it occurs only if the Value in FETCH FIRST N ROWS ONLY (N=0) then only this error will occur.

I am using WAS4.01 as a appserver.

Can any one help me why I am getting this error and solutions for it.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top