Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Data Type Mismatch creating a new DE class
Message
De
19/08/2003 18:17:05
 
 
À
19/08/2003 16:57:08
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Divers
Thread ID:
00821585
Message ID:
00821612
Vues:
25
>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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform