Solved

Port Access database to MSSQL database

Posted on 2002-05-09
2
199 Views
Last Modified: 2010-04-04
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
Comment
Question by:cookey
2 Comments
 
LVL 2

Accepted Solution

by:
mikepj earned 50 total points
ID: 7002809
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
 
LVL 1

Expert Comment

by:Moondancer
ID: 7108917
Finalized by Moondancer - EE Moderator
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now