• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 211
  • Last Modified:

Port Access database to MSSQL database

When I port Access database to MSSQLServer database, a strange error accur:"Invalid cursor state".  I never use cursor, How can I prevent this error?
1 Solution
Are you using ODBC?  I use a BDE replacement component set for ODBC to MSSQL.  First, a cursor is how you get your data.  In the BDE you may not realize that cursors are ALWAYS being used when you access any dataset.

What happens there is that when I open the dataset, the cursor is not on any record.  I need to say something like:

while mydataset.FetchRecord do

I can't right away get data out without asking for FetchRecord first otherwise I'll get an error similar to what you have described.

I know of an article where you can learn more about this if you're interested.

Finalized by Moondancer - EE Moderator
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now