Quantcast
Channel: MySQL Forums - Connector/J, JDBC and Java
Viewing all articles
Browse latest Browse all 884

SOURCE command and JDBC driver (no replies)

$
0
0
Hi,
I have an issue with the SOURCE command when I using it through the JDBC driver.
When I execute
ResultSet resultSet = statement.executeQuery("SOURCE c:/temp/MySQLfile.sql");
I get an exception
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: 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 c:/temp/MySQLfile.sql' at line 1

When I execute the same query in the mysql command line it works fine.

I have tried to use phpmyadmin with the SOURCE command but with no luck.

So is it possible to use the SOURCE command through the JDBC driver?

Viewing all articles
Browse latest Browse all 884

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>