Problem with executing "source ..." query
Posted by: Jozic
Date: May 08, 2005 03:53AM

Hi all,
I have a problem with executing sql query from java.
I'm using mysql 4.1.9 and jdk 5.0 on Windows XP.
I need to pass source file to mysql from java. When I do it from mysql console, it works fine.
"mysql> source U:/myfile.sql;"
But when I try to do it from java, I get following exception:
"java.sql.SQLException: 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 'source U:/myfile.sql' at line 1"

Executing other queries from java (for example "create database test1") works as it should be.

Please, help me if you can... :)

Options: ReplyQuote

Written By
Problem with executing "source ..." query
May 08, 2005 03:53AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.