Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Connection handle is invalid
Message
 
 
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:
01558498
Vues:
45
>>>>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.
>>>
>>>It looks like the database is dropping the connection and you may want to verify if it is still valid before sending tableupdate.
>>
>>Hey is there a good way to determine if a connection is still valid???
>
>In the try /catch block try to execute a simple select statement, e.g. select @@Version or something.

I just tested the above approach, select @@version, and the Select works. And right after this select, the TableUpdate() fails. So it must be something that TableUpdate() is using ...
"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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform