You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What is most efficient way to execute ODBC stored procedure?
Currently I'm using this way:
char szQuery[512]{};
uint32_t nID = 5316;
sprintf_s(szQuery, "{CALL pSelect_Data(%d)}", nID );
soci::rowset<soci::row> rs = (pDB->prepare << szQuery);
for (soci::rowset<soci::row>::const_iterator it = rs.begin(); it != rs.end(); ++it)
{
//do something with row result like soci::row const& row = *it;
}
This was the only way for me to run stored procedure and get some results instead of dropping into soci_error exception. But the reason I ask - sometimes when I call procedure it can actually give me empty result, while it shouldn't. It happens very randomly, can be at any point, like after few minutes, hours of looping on remote application.
The text was updated successfully, but these errors were encountered:
What is most efficient way to execute ODBC stored procedure?
Currently I'm using this way:
This was the only way for me to run stored procedure and get some results instead of dropping into soci_error exception. But the reason I ask - sometimes when I call procedure it can actually give me empty result, while it shouldn't. It happens very randomly, can be at any point, like after few minutes, hours of looping on remote application.
The text was updated successfully, but these errors were encountered: