I am suddenly having a problem. I am using V++ 6.0. I execute a query that I am absolutely certain will return 1 record. (in this case that is, there are times it may not return anything, so I have to check for empty, but the problem is when it does)
I check if it's got any data using the following, which is the way I've always done it:
if (!recset->IsEOF() && !recset->IsBOF())
This has been working in debug and release on Win2k.. Suddenly I run it on XP and that line continued to fail, as if EOF and BOF were both true, as if there were no data returned.. I added traces and message box's and such using GetRecordCount, and in fact GetRecordCount() returned 1 while at the same time the above IF statement failed as if there were no records.
What's going on here? I can replace that with:
if (recset->GetRecordCount() > 0)
and be up and running again on both platforms, but I'm confused as to why it suddenly does not work? This is just in this one scenario as well, I use similar statements to check for empty record sets elsewhere in the app, and they continue to perform as expected.