>If you are on the vfp-backend side have in your schema
>Member.NoSchool N(6)
>and hardcode your SQL as nvl(Member.NoSchool, CAST(0 as N(6,0)) you could get problems if you change your schema to
>Member.NoSchool N(9)
>you will get overflows again, if you by any chance change into
>Member.NoSchool C(12)
>you will return a wrong type. CAst(nvl(Member.NoSchool, 0) as N(6)) at least will guarantee the same field type in the resulting cursor, but you can run into overflows from the changed field type N(9). But if you datadrive like
>lcCast = " CAst(nvl(Member.NoSchool, 0) as " + Type("Member.NoSchool") + "(" + Fsize("NoSchool", "Member") + ")"
>or go via afields() for decimal places as well you can change your DB schema without worry.
Ok, thanks
For now, I only use that approach for Integer. All relation fields used in those INNER JOIN are on integer.