Dom DXecutioner
AWF VIP
- Local time
- Today, 10:01
- Joined
- Jun 25, 2007
- Messages
- 57
Greetings,
The attached sample illustrates the use of custom properties in a database.
There may be cases where you may need to store default information to a custom property. You may want to store the name of the application, version, back-end server path, etc.
The properties in this sample are:
Title
Version : concantinated version (0.9.1)
VersionMajor : major version, usually 0 is alpha or beta
VersionMinor : minor version
VersionRevision : revision
VersionDate : date released
AllowByPassKey : allow special bypass key
Author : name of developer(s)
Copyright : copyright notice (my company 2xxx)
JETDataSource : path to the back-end (if applicable)
Sample code:
to add a new property you'll need to create a get and let property for what you need... i.e., icon name and path
The let property calls the function "UpdateProperty" which you must supply the paramaters as illustrated in the code above. There's one last optional parameter "CreateNew", if the property does not exists, setting the value to TRUE will create it automatically...
If you have questions or bugs, please post in the forums with the exact same title...
Hope you find it usefull, enjoy
The attached sample illustrates the use of custom properties in a database.
There may be cases where you may need to store default information to a custom property. You may want to store the name of the application, version, back-end server path, etc.
The properties in this sample are:
Title
Version : concantinated version (0.9.1)
VersionMajor : major version, usually 0 is alpha or beta
VersionMinor : minor version
VersionRevision : revision
VersionDate : date released
AllowByPassKey : allow special bypass key
Author : name of developer(s)
Copyright : copyright notice (my company 2xxx)
JETDataSource : path to the back-end (if applicable)
Sample code:
Code:
[COLOR="seagreen"]'// obtain the application's title[/COLOR]
Debug.Print System.CDBSettings.Title
[COLOR="SeaGreen"]'// apply the application's new title[/COLOR]
System.CDBSettings.Title = "My Cool App"
to add a new property you'll need to create a get and let property for what you need... i.e., icon name and path
Code:
Public Property Let Icon(path As String)
UpdateProperty "Icon", DB_TEXT, path
End Property
Public Property Get Icon() As String
Icon= GetProperty("Icon")
End Property
The let property calls the function "UpdateProperty" which you must supply the paramaters as illustrated in the code above. There's one last optional parameter "CreateNew", if the property does not exists, setting the value to TRUE will create it automatically...
If you have questions or bugs, please post in the forums with the exact same title...
Hope you find it usefull, enjoy

Attachments
Last edited: