• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 210
  • 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?
0
cookey
Asked:
cookey
1 Solution
 
mikepjCommented:
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.

MP
0
 
MoondancerCommented:
Finalized by Moondancer - EE Moderator
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

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