Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
What causes conncection handle invalid error
Ooops, I think I accidently clicked on the send button before I could finish my thread last time. Here is the complete question:
HELP!!! Very frequently, as I ran my program (mainly a screen with pageframe, about 5 pages on the page frame), move from 1 record to another, then logout (I did not even do anything else); as I ran the progam the 2nd time, as the form class loads (as it execute: CLOSE DATA ALL), I get "connection handle invalid" error. Once that happens, I basically need to force VFP to quit (end task) & restart VFP. Typing CLOSE DATA ALL on the command window will give me the same error. Can anybody give me a hint on what to check?
myForm.Load():
CLOSE DATA ALL
lcConnStrAUSD="DRIVER={Microsoft Visual FoxPro Driver};" + ;
"SourceDB=C:\Projects\mydata.dbc;SourceType=DBC;UID=;PWD=;"
THIS.lnHandle=SQLSTRINGCONNECT(lcConnStrAUSD)
IF THIS.lnHandleERCA>0
lSuccess=SQLEXEC(THIS.lnHandleERCA,"SELECT * FROM myData","cMyData")
IF lSuccess=1
SET MULTILOCKS ON
CURSORSETPROP('Buffering',3,'cMyData')
CURSORSETPROP('TABLES','erca','cERCA')
CURSORSETPROP('UPDATABLEFIELDLIST','myField','cMyData')
CURSORSETPROP('KeyFieldList','myField','cMyData')
CURSORSETPROP('UpdateNameList','myField,'cMyData')
CURSORSETPROP('FetchMemo',.T.,'cMyData')
CURSORSETPROP('SendUpdates',.T.,'cERCA')
ENDIF
ENDIF
myForm.Unload()
*(as user clicks LogOut)
lSuccess=SQLDISCONNECT(THIS.lnHandle)
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement