>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.