List:MySQL++« Previous MessageNext Message »
From:Warren Young Date:November 21 2008 4:48pm
Subject:Re: stored procedure
View as plain text  
On Nov 21, 2008, at 5:15 AM, Jim Wallace wrote:

> query.def[0U] = serverId;
> query.def[1U] = player1AmtChanging;
> query.def[2U] = transactionType;
> query.def[3U] = currencyType;
> query.def[4U] = glid;
> query.def[5U] = qty;
>
> query.parse();
>
> Result res = query.store();

To compile with MySQL++ v3, a literal code update would be:

query.template_defaults[0U] = serverId;
query.template_defaults[1U] = player1AmtChanging;
query.template_defaults[2U] = transactionType;
query.template_defaults[3U] = currencyType;
query.template_defaults[4U] = glid;
query.template_defaults[5U] = qty;
query.parse();
StoreQueryResult res = query.store();

However, a more idiomatic way to do the same thing is:

query.parse();
StoreQueryResult res = query.store(serverId, player1AmtChanging,
		transactionType, currencyType, glid, qty);
Thread
stored procedurekunal kabra21 Nov
  • RE: stored procedureJim Wallace21 Nov
    • Re: stored procedureWarren Young21 Nov