>I would like to pass a value from a temp file to SQL server field. The type of field could be a memo field or a date field. To get the value into SQL server it needs to a string. Therefore I need to test what the field type is first.
>
>Therefore I would like to find whether the field is a date or a memo based on this I will either DTOS the field or use a function for converting a memo field into a date field.
>
>IIF(planning.date=A MEMO FIELD TYPE, whatever function, DTOS(planning.date)
>
>I just need to find out what type of field it is then either convert the date to string or the memo to string. Is this possible?
Take a look in TYPE() or VARTYPE() function
?TYPE("Table1.MemoField")
?TYPE("Table1.DateField")
?VARTYPE(Table1.MemoField)
?VARTYPE(Table1.DateField)
so I do the following IIF()
IIF(TYPE("planning.date") == "D",DTOS(planning.date), whatever function)
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.