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:
00412606
Views:
20
>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
Jim Munn, MCSD
Visual Data Solutions
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform