Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Data Type Mismatch creating a new DE class
Message
From
19/08/2003 18:17:05
 
 
To
19/08/2003 16:57:08
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00821585
Message ID:
00821612
Views:
26
>Having defined a new DBF, I created the new business object. Using the
>Business Object Builder, I added a new data environment to my new
>business object. Unfortunately, when I went to save it, I got a "Data
>Type Mismatch" error.
>
>This was caused by GetObjNondefaultProperties() (in UTILITY.PRG) calling
>CharValue() to return a character representation of an object. It seems
>that GetObjNondefaultProperties() was passed my new data environment
>object and needed to get a string of the non-default properties.
>Unfortunately, one property was oDataEnvironment (???) which, of course,
>wouldn't translate into a string.
>
>Does anyone know why that occurred? Any clue as to how I could have
>messed this up?
>
>Thanks ahead of time.

You just upgraded to VFP 8, I presume. The behavior change that object references now return "(Object)" to various functions causes the break.
Replacing the CharValue() function in Utility.prg with te following code
will get it working correctly again.
FUNCTION CharValue(tuExpression)
IF VARTYPE(tuexpression) = "O"
	lcRetVal = ""
ELSE
	lcRetVal = TRANSFORM(tuExpression,"")
ENDIF
	RETURN lcRetVal
ENDFUNC
Chris.
Previous
Reply
Map
View

Click here to load this message in the networking platform