Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cursors will not release 1

Status
Not open for further replies.

Proteus7

IS-IT--Management
Joined
Feb 26, 2002
Messages
75
Location
US
Hi,

I'm working on this project using VFP 6.0. I have this form form A. In this form they type in a customer name and populates grid with info on any customer that has that name. They select the correct customer and address out of the grid.
Next they click the ticket button and it does an SQL insert into the proper table with that information(info is not whole) then it releases Form A and brings up Form B so that the rest of the info can be entered.

Ok, here is the problem. In designer mode Everything goes corect. In the exe form I get an error as soon as I click on the ticket button. Error states that it can not update currsor. Then it gives a name of a table that is not even in use. No I did not have this table open. In the datasession it opens the cursor that I created from my select statements. A session called Unknown is open and the release datasession is not working.

However if I use the release all or the close all. The datasession will clear, but then when Form B opens it can not find any tables or even point to the insert.

How can I manually in my code tell it to close the datasessions that I want it to close and still allow the ones that I want to open to oen.

Larry
 
Usually when an unknown datasession occurs, this mmeans some object cannot be released and the datasession stays open since objects are bound to a datasession and not the other way around.

Have you tried to determine in which line of code or object the error occurs.

You could try and run your exe in VFP (do myexe.exe) and try to determine in which method or object the error occurs.

Are you absolutely sure all your tables are NOT included into your project ??

Good luck,

HTH,
Weedz (Edward W.F. Veld)
My private project:Download the CrownBase source code !!
 
Ok,
I ran it in the VFP. The error occurs on the click event. I took care of the unknown currsor problem. Now it gives a more detailed error. It still says that the cursor cannot be updated. But it indicates that the update failed in the newid.prg. The only thing that this program does is to receive the table name, open the ids table, find the table name & current id, add one to id, return value.

The ids table is captured in the program and used there and closed. How ever the function call for it is not used untill the second line of code. I don't even make it to the first line.

Any ideas?

Larry
 
HI
This is a problem of marking the table as included in the project. Ensure that the data table is marked Excluded in your project and then recompile and run.
Right click on the table in the data tab and select exclude..
Hope this helps :-) ramani :-9
(Subramanian.G),FoxAcc, ramani_g@yahoo.com
 
ramani,

You are the best. Once again I owe you big. For the last week I have been racking my brain trying to find out why this was doing this.

THANKS!!!!!!

Larry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top