MySQL Forums
Forum List  »  Connector/C++

Re: Declaring user variable into database using mysql connector c++
Posted by: Armand Moutchiho
Date: January 31, 2017 03:11AM

Peter Brawley Wrote:
> > create an user variable from c++ code using the
> Connector/C++!??
> User vars exist in MySQL threads, so execute a
> query that sets it eg "set @myvar=0".

Ecept if I don't get your answer,
I did tried that like in the commands line(s) I wrote. I tried ExcuteStatement() and also tried ExecuteQueryStatement() using following string(s):
"SET @ReturnValue ='';"
"SET @ReturnValue = STR_TO_DATE('2021-5-13 3:5:9','%Y-%m-%d %H:%i:%S');

But when I Select the variable in a mysql client the variable values is still NULL.

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.