Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Connection handle is invalid
Message
De
01/12/2012 14:15:13
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Versions des environnements
SQL Server:
SQL Server 2008
Divers
Thread ID:
01558490
Message ID:
01558554
Vues:
43
>>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?

haven't delved there - other update properties of CA like tablename, fieldlists and so on set correctly ?

HTH

thomas
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform