• Post Reply Bookmark Topic Watch Topic
  • New Topic

Syntax error! HELP!  RSS feed

 
Naf Rash
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I keep getting the following error on a number of my programs and can't seem to understand why I have it. The first one comes up for one of my methods:
Syntax error on token "statement", ";" expectedconnectionBox.java
The starting code for the method is :

The error occurs on line: statement = connection.createStatement();

The second error I am getting which is basically the same erroe is:
ErrorSyntax error on token "(", ";" expected
and the code for this is as follows:

(the error relates to the ( before ResultSetMetaData..... )

Please help-I have looked at the code and don't understand why its occurring!
[ edited to preserve formatting using the [code] and [/code] UBB tags -ds ]
[ February 24, 2004: Message edited by: Dirk Schreckmann ]
 
Carlos Failde
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For the first bit of code the line

has the semicolon in the wrong place. You don't want it ao part of the comment.
The second bit of code

looks like part of the comment from the first line has run on to the second line.
 
Naf Rash
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
looks like part of the comment from the first line has run on to the second line.
-No that hasn't happened! Any other ideas?
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In you posted example, it has indeed happened.
Perhaps if you were to post a more complete error message (and any relevant code), folks could help you pinpoint this differently.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!