Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What causes conncection handle invalid error
Message
From
01/11/2002 17:29:15
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
What causes conncection handle invalid error
Miscellaneous
Thread ID:
00718055
Message ID:
00718055
Views:
60
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)
Next
Reply
Map
View

Click here to load this message in the networking platform