MySQL Forums
Forum List  »  Connector/C++

Declaring user variable into database using mysql connector c++
Posted by: Armand Moutchiho
Date: January 29, 2017 09:05AM

Hello to Everyone,

I am developping a software using c++ and MySQL(for the database). I am currently having the issue that I don't find anything online on how to define
user variables like "@returnValue". Since I want like in all my previous experiences to keep a return status to all my call procedures, I would really like for consistency to have a solution for this. I am also under the impression that many other will have the same questions as they seem to be some links on Google for MySQl Connector/Net but not for c++.
I have tried lines similar to the following:

"SET @ReturnValue ='';"
or
"SET @ReturnValue = STR_TO_DATE('2021-5-13 3:5:9','%Y-%m-%d %H:%i:%S');

They work fine using a mysql console client but not when executing these statements (or prepared statements) under c++.
Have somebody found a workaround or solution for this!?

Thanks a lot in advance!

Armand

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

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.