Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CursorFill doesn't return an error
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01070830
Message ID:
01070837
Vues:
16
>
>IF NOT CA.CursorFill()
>   AERROR(laError)
>   MessageBox(laError[1,2])
>ENDIF
>
>
Where should I place this code? I can not change cursor object class :( It's MereMortals class. I have _cabase class with the following code in CursorFill (this is the code by Mark, I didn't change it, but this class I may change):
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
RETURN llRetval
Do you suggest to put it here right after llRetVal if it's false?
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform