Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Catching error CA RecordRefresh()
Message
 
 
To
21/11/2011 10:51:00
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01529369
Message ID:
01529390
Views:
21
>>>Hi,
>>>
>>>If a call to CursorAdapter RecordRefresh() returns .F., how can I catch the description of the problem? TIA.
>>
>>I had this code in the CursorFill method of the base CA class:
>>
>>
>>lparameters lUseCursorSchema, lNoData, nOptions, uSource
>>if not pemstatus(this, 'lADO_Done', 5)
>>	this.addproperty('lADO_Done')
>>endif
>>if this.datasourcetype = [ADO] and not this.lADO_Done
>>	return
>>endif
>>local llSchema, llNoData, lnOptions, luSource
>>llSchema  = lUseCursorSchema
>>llNoData  = lNoData
>>lnOptions = nOptions
>>luSource  = uSource
>>if vartype(this.nFillOptions) <> "N"
>>	this.nFillOptions = -1
>>endif
>>if pcount() < 1 or vartype(llSchema) <> "L"
>>	llSchema = this.usecursorschema
>>endif
>>if pcount() < 2 or vartype(llNoData) <> "L"
>>	llNoData = this.nodata
>>endif
>>if pcount() < 3 or vartype(lnOptions) <> "N"
>>	lnOptions = iif(this.datasourcetype = [ADO], this.nFillOptions, 0)
>>endif
>>local llRetVal
>>if this.datasourcetype = [ADO]
>>	llRetVal = dodefault(llSchema, llNoData, lnOptions, this.oADO_Command)
>>else
>>	if pcount() = 4
>>		llRetVal = dodefault(llSchema, llNoData, lnOptions, luSource)
>>	else
>>		llRetVal = dodefault(llSchema, llNoData, lnOptions)
>>	endif
>>endif
>>nodefault
>>if not m.llRetVal && There was an error trying to execute CursorFill
>>	local laError[1]
>>	aerror(laError)
>>	if laError[1,1] <> 1839
>>		=ErrorMsg("Error trying to execute CursorFill method: " + laError[1,2] + ;
>>			chr(13) + chr(10) + "SelectCMD is " + this.selectcmd)
>>	ELSE
>>		
>>		if vartype(m.plStop) = "L"			
>>				this.lRepeatRequery = not m.plStop
>>		endif
>>	endif
>>endif
>>
>>return m.llRetVal
>>
>
>Thank you for the code. What is the error 1839?

Microsoft Visual FoxPro
OK
Help
SQL: Operation was canceled.

--------------------------------
This class I was using with VFP tables and had ability to cancel long running queries by pressing ESC.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform