I am porting an existing windows based C++ application to 64 bit environment and this is one of those weird errors.
In the code snippet you can that I am using openforwardonly and it used to work fine with our old setup but in the 64 bit environment it gives the problem of fetching only ONE recordset. Or it could be a problem with the <b>MoveNext(); </b> of ADO.
To circumvent it we started using adOpenStatic and it worked fine for me for a while but only later realized that it has a performance hit and it is taking forever to get/iterative through values.
I request someone to try this code with both the flags and validate the behavior I am seeing.
Information about ado flags:
Another EE topic
I remember seeing a MS support case but I can't get to it now.
I would appreciate any help or suggestions. I know we are using old technology but we want to move to the additional capabilities without changing code much.
// Dbtest.cpp : Defines the entry point for the console application.
#import "C:\Program Files\Common Files\System\ADO\msado15.dll" \
no_namespace rename("EOF", "EndOfFile")
int main(int argc, char* argv)
HRESULT hr = S_OK;
_bstr_t strCnn("Provider=OraOLEDB.Oracle;Data Source =****; User Id=****; password=***");
printf("Failed creating record set instance\n");
//Open the Record set for getting records from Author table
_RecordsetPtr pRstDoctors = NULL;
pRstDoctors->Open("select logid from t_log",strCnn, adOpenForwardOnly,
//Declare a variable of type _bstr_t
//Loop through the Record set
valField1 = pRstDoctors->Fields->GetItem("phy")->Value.intVal;
// valField2 = pRstDoctors->Fields->GetItem("reportid")->Value.intVal;
// printf("%d - \n",valField1);
printf("time difference is %.2lf",dif);