CType()

  • Thread starter Thread starter John A Grandy
  • Start date Start date
J

John A Grandy

does CType() provide any auto-conversions ... ?

for example, if i use

CType(rs!MyField,String)

will fields with nulls, or numerics, etc. be converted?

what's the fastest way to handle this type of thing ?

(assuming you are happy with a fixed set of auto-conversions)
 
* "John A Grandy said:
does CType() provide any auto-conversions ... ?

It will do conversions which are defined for the datatype.
for example, if i use

CType(rs!MyField,String)

will fields with nulls, or numerics, etc. be converted?

No, 'DBNull.Value' cannot be converted to a string. You will have to
check the field's value and do the conversion yourself.
 
Back
Top