Bug #665 Two insert statements are not working in the single execute statement

Submitted: 18 Jun 2003 0:11 Modified: 18 Jun 2003 6:16
Reporter: ramachandra reddy Email Updates:
Status: Not a Bug Impact on me:
None 
Category:Connector / J Severity:S1 (Critical)
Version:4.0.13 OS:Windows (windows 2000)
Assigned to: Mark Matthews CPU Architecture:Any

[18 Jun 2003 0:11] ramachandra reddy
Description:
Hi,
i am using the following query in my java class,but mySQL is not supporting.can you please provide the solution to me.we are using type 4 odbc driver
query="INSERT INTO AWB_DETAILS (AWB_NO, AWB_PREFIX, SHIPMENT_TYPE, ORIGIN, DESTINATION, WEIGHT_CODE, WEIGHT, TOTAL_PIECES, TIMESTAMP ) VALUES ( '43779831',232,'T','HAM','KUL','K',0.2,1,SYSDATE );SELECT LAST_INSERT_ID();"

Statement insertStmt = conn.createStatement();
insertStmt.execute(awbDetailsQuery.toString());

thanks & ragards
Reddy

How to repeat:
can you provide the solution
[18 Jun 2003 6:16] Mark Matthews
MySQL 4.0 does not support multiple statements via the client libraries. You can do this in the command-line client, because ';' is a command-terminator, _not_ a query separator.

MySQL-4.1 will have optional support for multiple queries in the client libraries.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.049 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
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.