O'Reilly logo

F. Scott Barker's Microsoft® Access 2000 Power Programming by F. Scott Barker

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

SETTING AND RETRIEVING SYSTEM SETTINGS WITH ADO

The routines in Listing 27.2 reflect their DAO counterparts with the names ap_SetDatabaseProp and ap_GetDatabaseProp.

Listing 27.2. VideoApp(ADO).mdb: The Main Startup System Checking Routines
 Sub ap_SetDatabaseProp(strPropertyName As String, varValue As Variant) Dim rstDBProps As New ADODB.Recordset rstDBProps.Open "ztblDatabaseProperties", CurrentProject.Connection, _ adOpenDynamic, adLockOptimistic rstDBProps(strPropertyName) = varValue rstDBProps.Update rstDBProps.Close End Sub Function ap_GetDatabaseProp(strPropertyName As String) As Variant Dim rstDBProps As New ADODB.Recordset rstDBProps.Open "ztblDatabaseProperties", CurrentProject.Connection, _ adOpenStatic ap_GetDatabaseProp = rstDBProps(strPropertyName) ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required