Quantcast
Channel: dBforums – Everything on Databases, Design, Developers and Administrators
Viewing all articles
Browse latest Browse all 13329

java problem with semicolon as statement separator

$
0
0
I am connection to DB2 Express-C v10.1 for windows from my java program and trying to execute two queries in a single statement. I am using db2jcc.jar to establish my JDBC connection.

I am getting :eek: com.ibm.db2.jcc.am.SqlSyntaxErrorException: DB2 SQL Error: SQLCODE=-104, SQLSTATE=42601, bla bla bla bla ;BEGIN-OF-STATEMENT;<space>, DRIVER=3.63.123

If I break the two query and execute them separately it just works as expected. How can I resolve this. :o

ALTER TABLE "table name" ADD CONSTRAINT "xxx" PRIMARY KEY ("xxxxx", "xxxxx", "xxxxx", "xxxxx");CREATE UNIQUE INDEX "xxxxx" ON "xxxxx" ("xxxxx", "xxxxx", "xxxxx", "xxxxx")

Viewing all articles
Browse latest Browse all 13329

Trending Articles