ACC2: Setting a Database's V1xNullBehavior PropertyID: Q114548
|
In Microsoft Access version 2.0, the behavior of Null and zero-length
strings differs from that in Microsoft Access version 1.x. Microsoft Access
version 2.0 can distinguish between Null and zero-length strings, whereas
Microsoft Access version 1.x cannot.
Because of this, Microsoft Access version 2.0 has a new property called
V1xNullBehavior that you can use to cause Microsoft Access to convert zero-
length strings to Null. This property applies only to version 1.x databases
that have been converted to version 2.0. When you convert a database from
version 1.x to version 2.0, the V1xNullBehavior property is automatically
created.
The V1xNullBehavior property triggers these behaviors:
Sub SetV1XNullBehavior ()
Dim db As Database, prop As Property
Set db = DBEngine.Workspaces(0).Databases(0)
Set prop = db.CreateProperty("V1xNullBehavior", DB_INTEGER)
prop.Value = True
db.properties.Append prop
db.Close
End Sub
For more information about the V1xNullBehavior property, search for
"V1xNullBehavior" then "V1xNullBehavior Property" using the Microsoft
Access Help menu.
Microsoft Access "Building Applications," Appendix C, "Conversion Issues
and New Features for Access Basic"
Microsoft Access "Building Applications," Chapter 7
Keywords : kbprg
Version : 2.0
Platform : WINDOWS
Issue type : kbinfo
Last Reviewed: April 2, 1999