At 22:45 -0800 12/17/02, Amit Lonkar wrote:
>Hi All!
>
>I want to execute the Mysql command "source
>c:/Test.sql" through java.
That doesn't make sense. "source" is one of the internal
commands understood by the mysql client program. It's
not a SQL statement that you can execute though the JDBC
interface.
>
>Which method of the statement interface should I use.
>I tried all the three below but they generate an SQL
>Exception as :-
>"You have an error in your SQL syntax near 'source
>c:/netapsv1/tempfiles/Test.sql' at line 1" :-
>
>String sql = "source c:/netapsv1/tempfiles/Test.sql";
>execute(String sql)
>executeQuery(String sql)
>executeUpdate(String sql)
>
>Thanks
>Amit Lonkar