Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Connection handle is invalid
Message
 
General information
Forum:
Microsoft SQL Server
Category:
Other
Environment versions
SQL Server:
SQL Server 2008
Miscellaneous
Thread ID:
01558490
Message ID:
01558536
Views:
51
>Hi,
>
>I have a situation when on the TableUpdate() I get error "Connection handle is invalid." And the same program but with a different database, in the same place, does not work without error. The VFP application is using CursorAdapter to update SQL Server database. Can this type of problem be caused by some difference in the database table? Or what can I check in the debugger prior to calling TableUpdate() that would give a clue is where the problem may be?
>TIA.

I have founded what causes this problem and before I change the entire design of this part of the program I would like to know if there is a simpler solution. Here is what caused the problem:

What happens is if you Attach an alias (cursor) to a CursorAdapter object that didn’t create this alias (cursor) in the first place, the TableUpdate() fails. That is, there is apparently some handle that VFP sets to the alias (cursor) created by CursorAdapter and this handle is stored in both the CursorAdapter object and in the alias (cursor). When you attach this cursor to a different CursorAdapter object and even though the CursorStatus of the object changes to 2 (meaning CursorAdapter alieas is attached via the CursorAttach method) the TableUpdate() failes.

My question is, do you know what this “handle” is and how to update it when you attach an alias (cursor) to CursorAdapter object?
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform