• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

MySQL and Java in Nebeans..

 
Patrik sjostrand
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I´m trying to connect mySQL with Netbeans, the connection succeded in the test. But when I try to view or execute some sql then I get this "Error".

Error code 1064, SQL state 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'OPTION SQL_SELECT_LIMIT=DEFAULT' at line 1.

Can someone help me? :-)

I ´m a beginner.


Thanks!

/Patrik
 
Liutauras Vilda
Bartender
Pie
Posts: 2780
111
BSD VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Patrick, welcome to the Ranch.

Please post the code you're trying to execute. And please use code tags when post your code.
In short, there is most likely syntax error in your query.
 
Patrik sjostrand
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello!

Thanks.

I have not write any code yet. I´m just trying to get a connection from myphpadmin (test database) and netbeans 7.3. I have a Java connector/J driver in my lib (Project). But
I think the error is from the driver. But I´m not sure about that...

Sorry for my english.


/Patrik
 
Campbell Ritchie
Sheriff
Posts: 51349
87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please show us the whole SQL with the offending line marked.

I shall move you to our databases forum.
 
Dave Tolls
Ranch Hand
Posts: 2091
15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What version of MySQL are you using, and what version of ConnectorJ?
 
Patrik sjostrand
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi again!


Java Connector/J driver version 5.1.38 (i think this is the version).

phpMyAdmin XAMPP - version 3.2.1 (i think this is the version).

Netbeans 7.3

I have connection succeeded but I can´t view or execute sql in netbeans 7.3.



/P
 
Liutauras Vilda
Bartender
Pie
Posts: 2780
111
BSD VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check this out http://bugs.mysql.com/bug.php?id=66659
and this.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic