Solved

Port Access database to MSSQL database

Posted on 2002-05-09
2
196 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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
This video discusses moving either the default database or any database to a new volume.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

706 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

19 Experts available now in Live!

Get 1:1 Help Now