the stored procedure works perfectly as i tested it both in VB and ASP,
but when i try to call stored procedure from VC++, then i get a
Idispatch error #3092.
here is the code:
BSTR newpin; } is there any problem with this code. rst->Fields->GetItem((short)0)->GetValue(); may still return correct value. Also have you tried PutRefActiveConnection instead? It's difficult to say without more information.
_bstr_t qsql = "{call user.getpin(?,{resultset 100,pin})}";
command->PutActiveConnection(conn);
command->PutCommandText(qsql);
command->Parameters->Refresh();
command->Parameters->Item[_variant_t((sh
rst = command->Execute(NULL,NULL,adCmdText);
if(rst->RecordCount > 0)
{
newpin = rst->Fields->GetItem((short)0)->GetValue
thanks
Can you provide more complete sample including code for creating stored procedure? Are you sure about syntax "{call user.getpin(?,{resultset 100,pin})}";? Also which line of code throws the exception? BWT RecordCount may be 0 but
No comments:
Post a Comment