Skip to content

How to deal with null value coming from Database #3

@dmarcicLIH

Description

@dmarcicLIH

Hi,
I am testing your ORM, it seems great and pretty well done but i have an issue with null values coming from Table in the database. Specially in the IDatabaseObject_Load method.

For the string i have use this syntaxe with the IIF Test and it's ok :
Me.ShipRegion = IIf(IsNull(objFields("ShipRegion")), vbNullString, objFields("ShipRegion"))

But for other types, as there are no equivalent to vbNullString if i set them directly like that :
Me.Height = objFields("Height")
with objFields("Height") returning null and Height set as Integer, I receive a null exception, which is normal in VB6.

So, please can you tell me how do you deal in the mapping of your null value from Integer, Long, Date variables... in the projects where you used this ORM please ?

Thanks
David

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions