Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Get Field DataType when value is Null?
Message
General information
Forum:
Visual Basic
Category:
Database DAO/RDO/ODBC/ADO
Miscellaneous
Thread ID:
00412583
Message ID:
00412688
Views:
18
>>How can I get the data type of a field in an ADO recordset when the value is currently Null?
>>
>>I need to set field values to a default empty string or 0, etc., for Null values.
>
>
>Dim ltype
>ltype = oRS.Fields("address").Type
>
>Select Case ltype
>
>    Case adChar, adVarChar ...
>
>        oRS.Fields("address").Value = ""
>
>    Case adSingle, adDouble ...
>
>        oRS.Fields("address").Value = 0
>
>    'etc
>
>End Select
>
Oh yeah, a lot simpler than OpenSchema!!!
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Previous
Reply
Map
View

Click here to load this message in the networking platform