January 20, 2017 at 3:32 pm
Sue
January 20, 2017 at 3:52 pm
Sue_H - Friday, January 20, 2017 3:32 PMIt's not a SQL Server issue or error, doesn't have anything to do with SQL Server. It's an ADO recordset issue/error. You don't have the current recordset at the time you movenext. It's been too long that I have no idea how to address that. Some way to requery or use a different recordset type is all I can think of.
No idea what is a good ADO forum either but that would be where you would want to post this.Sue
Hi Sue, I had similar thoughts this was a ADO recordset issue but it doesn't occur with Access and didn't occur for this client with this same piece of code until recently so I didn't want to rewrite the code if the problem exists in some ADO driver that only allows a limited number of record sets to be returned. What's strange is that this code doesn't fail with 1 in the record set, just 2 or more so the movenext should fail with 1 too. I'm not that familiar with this forum so if you know of a more focused post area let me know.
January 20, 2017 at 4:26 pm
scott 87260 - Friday, January 20, 2017 3:52 PMHi Sue, I had similar thoughts this was a ADO recordset issue but it doesn't occur with Access and didn't occur for this client with this same piece of code until recently so I didn't want to rewrite the code if the problem exists in some ADO driver that only allows a limited number of record sets to be returned. What's strange is that this code doesn't fail with 1 in the record set, just 2 or more so the movenext should fail with 1 too. I'm not that familiar with this forum so if you know of a more focused post area let me know.
Everyone always blames the database....🙂
The error comes from the OLE DB provider itself. Being that you would use different providers for Access than for SQL Server and being that Access <> SQL Server, they aren't going to behave the same. Similar but not the same. Years ago, SQL Server supported things with the recordsets that Access did not. I have no idea if that's still true.
And drivers/providers/frameworks get updated so you can have scenarios where the database doesn't change but other pieces do which can affect the functionality and then you see new errors. And as I type this I thought of one other thing that can contribute to that issue - if the table doesn't have a primary key.
But I would just search on the error message and see what you find.
Sue
Viewing 3 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply