>>Since you have the data type, you could use a SELECT CASE statement to examine the individual data types and set a the type variable accordingly. For example, VAL() for numerics, EVALUATE() for Booleans, etc.
>
>Evaluate for them all - they'll just turn out into their proper data type. Type('eval(".f.")') gives you a "L", and Ttype('eval("1")') gives you a "N"; therefore Eval(".f.") does give you a real Boolean .f. and no problems.
Unfortunately, this won't work in all cases. If the SQLSETPROP() statement needs to accept a character (DataSource, for example), using EVALUATE() will generate an error. You might be able to trim it down to an IF..ELSE statement, but you're going to have to check the data regardless.
George
Ubi caritas et amor, deus ibi est