Re: execute multiple queries with mysql c++ connector
From: Axel Schwenke <axel.schwenke_at_gmx.de>
Date: Tue, 7 Mar 2017 17:46:27 +0100
Message-ID: <o9mnvr$hnn$1_at_dont-email.me>
Date: Tue, 7 Mar 2017 17:46:27 +0100
Message-ID: <o9mnvr$hnn$1_at_dont-email.me>
[Quoted] [Quoted] On 07.03.2017 11:56, kushal bhattacharya wrote:
> Cant i use semicolon in c++ mysql connector too ?
Obviously not. Haven't you just got an error message for that?
> i Have to run the above queries simultaneously not as a separate query statement
- what you have shown before was a single statement ending with a semicolon, not multiple statements. You're blabbing incoherently.
- no, you cannot run two (or more) statements simultaneously in one connection. It's impossible. You might be able to *send* multiple statements at once [1] but it's highly discouraged. But even in that case the statements will be executed one after the other.
- whenever you think you have to run two (or more) statements simultaneously to achieve a certain result, you're doing it wrong.
[1] https://dev.mysql.com/doc/refman/5.7/en/c-api-multiple-queries.html [Quoted] but I don't think Connector/C++ exposes that functionality Received on Tue Mar 07 2017 - 17:46:27 CET