Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error Message # 1886
Message
 
 
To
17/05/2007 09:46:36
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Network:
Windows 98
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01022718
Message ID:
01226295
Views:
19
>If you talk of the error 1886, yes it is a bug,
>because you can seek a NULL value into a not nullable field.
>
>VFPT, before VFP9, apply the field restrictions to the index key,
>and this is a bug.
>
>It is as to fire an error if you seek 40 into a field with a check for
>BETWEEN(field,1,10).
>
>
>>I'm getting this error from CursorRefresh method of CA. I do use LEFT JOIN and I thought at first it has to do with NULLs, so I added NVL for each field from the right table (now will have to undo it). It didn't help with the error.
>
>now will have to undo it ? Not true.
>
>now ( in VFP9 ) will CAN to undo it.
>
>Fabio

Hi Fabio,

Yes, I was getting an error 1886. I haven't searched for this here first and so I thought there is some data problem. Yes, I found some data problems indeed, like records saved without description (bogus records). Anyway, the problem continued.
And the interesting part that I didn't have this error originally.

So, my next idea was to try to get rid of NULLs in the resulting query. I surrounded all fields from the right table with NVL. This didn't help either. At this point I searched here, found several threads on the topic, realised it was a bogus error, removed NVL from the queries and changed the original code to this one:
LPARAMETERS nColIndex
DODEFAULT(m.nColIndex)
LOCAL llError
llError = .f.   
IF INLIST(THIS.ROWCOLCHANGE,1,3) && Row change
	
	PRIVATE piProblem_Code, piID
	piID = 0
	piProblem_Code = crsAllProblems.iProblem_Code
	IF NOT THISFORM.oCAProblemResolution.CURSORREFRESH() && Related resolutions
	    
		AERROR(laError)
		IF NOT laError[1,1] = INDEX_NULL_ERROR
		    llError = .t.
			=MESSAGEBOX(laError[2],MB_ICONEXCLAMATION,'Error in Cursor Refresh Method for CAProblemResolution')
		ENDIF			
	ENDIF
	
	IF NOT m.llError
		LOCAL lnResolutions
		lnResolutions = RECCOUNT(THISFORM.oCAProblemResolution.Alias)	
		this.StatusBarText = " Click on columns headers to sort. Current problem has " + ;
		TRANSFORM(m.lnResolutions) + " related resolution" + ;
		IIF(m.lnResolutions = 1,".","s.")
	ENDIF		
	THIS.PARENT.REFRESH()
ENDIF
So, now I simply ignore this error. Hopefully I choose the right path.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform