how to cahnge delimiter in Mysql from a java program

S

Sarath

Hi all,

I have a small problem.
I have to change the default delimiter of MySql from ';' to '$'.

When i give the command "delimiter $" in the MySql command prompt it
works fine.
But when i do the same thing from my code :

statement.execute("DELIMITER $")

it gives this error,
"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 'DELIMITER $' " Exception.

If any one has any clue... pls tell me where it is going wrong.

thank you,
Sarath
 
?

=?ISO-8859-1?Q?Arne_Vajh=F8j?=

Sarath said:
I have a small problem.
I have to change the default delimiter of MySql from ';' to '$'.

When i give the command "delimiter $" in the MySql command prompt it
works fine.
But when i do the same thing from my code :

statement.execute("DELIMITER $")

it gives this error,
"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 'DELIMITER $' " Exception.

If any one has any clue... pls tell me where it is going wrong.

What JDBC driver version are you using ?

Arne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,189
Latest member
CryptoTaxSoftware

Latest Threads

Top