cancel
Showing results for 
Search instead for 
Did you mean: 

Error in ResultSet statement

Former Member
0 Kudos

Hi,

I am facing one issue in connecting an application to database. In the code it is showing error like

ResultSet RST=sql1.executeQuery(querysele1);

Syntax Error on token "ResultSet", "finally" is expected.

Please help me out with this experts

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

the screen shot for the error is

please help me out with this

Qualiture
Active Contributor
0 Kudos

Hi,

Like I mentioned above, check if you have any rogue starting brackets, missing closing brackets or unfinished statements in your code.

This is 100% sure the cause for your error

Answers (4)

Answers (4)

amol_gaddamwar
Explorer
0 Kudos

Hi,

From your screenshot i can see the line just above the line where error is coming you have While statement which is commented.

You cannot have bracket without where clause.

Either un-comment While else remove bracket

Regards,

Amol

Former Member
0 Kudos

dear

I know very little java. so please help me out

ErvinSzolke
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

here you can read more about the try-catch-finally block:

http://docs.oracle.com/javase/tutorial/essential/exceptions/try.html

I hope this helps.

Regards,

Ervin

Qualiture
Active Contributor
0 Kudos

Hi Shilpi,

This has nothing to do with WDJ but is a generic Java error.

Most likely you have a rogue squiggly bracket somewhere in your code.

Check for any missing closing (or too many opening) brackets.

junwu
Active Contributor
0 Kudos

did you know java?

paste all the code here, then we can help