How can I prevent an old version of the FE of a DB from being used

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello All

I have a problem with users not updating the front end on their PC when I
release a new version of the data base.

Each version of the front end that I release would either fix code problems
or release enhanced features.

Is there a way to prevent a user from using an older version of a data base
front end???

Cheers
 
Create two tables for DB administrative values (tblSystemValuesLocal,
tblSystemValuesGlobal). Local being in the FE and Global being in the
backend and linked to the front end. Each table should have the
following fields (text-type)

txtSystemValueKey
txtSystemValueDescription
txtSystemValue
txtSystemValueType

Add the following to each table:
FEVERNO
Front End Version Number
4
Number

Finally, when the FE DB starts up use the functions below to grab the
values for the VERSION NUMBER. If they match, let the FE DB continue to
start up. If they don't match, give the users a warning message.

Granted you'll have to update each and every FE to distribute the code,
but once that's done you should be fine from there. (A cheap way to
ENSURE all of the FEs are updated would be to rename the directory in
which the backend DB resides and relink the tables in the NEW FE.
Renaming the backend will break the connection to all of the old FE's
locking out everyong. :)
NOTE: The txtSystemValueType is there so that if you add aditional
values, you can figure out how to convert the text value to an
appropriate type (CDbl(), CDate(), etc.) One immediate use would be to
do a FE drop-dead upgrade date afterwhich the old FE can't be opened to
do that add another record in the tblSystemValuesGlobal table such as

DBFEExpiration
Expiration date for out dated front end versions
10/31/2005
date

You would then use the getSystemValueGlobal() and compare the result to
NOW to determine if the outdated FE should be locked out.

Function getSystemValueLocal(strValue As String)

Dim tmpValue As Variant
Dim tmpValueDataType As Variant

tmpValue = DLookup("txtSystemValue", "tblSystemValuesLocal",
"txtSystemValueName = '" & strValue & "'")
tmpValueDataType = DLookup("txtValueType", "tblSystemValuesLocal",
"txtSystemValueName = '" & strValue & "'")

Select Case tmpValueDataType
Case "Number"
tmpValue = CDbl(tmpValue)
Case "Date"
tmpValue = CDate(tmpValue)
Case Else
End Select

getSystemValue = tmpValue

End Function

Function getSystemValueGlobal(strValue As String)

Dim tmpValue As Variant
Dim tmpValueDataType As Variant

tmpValue = DLookup("txtSystemValue", "tblSystemValuesGlobal",
"txtSystemValueName = '" & strValue & "'")
tmpValueDataType = DLookup("txtValueType", "tblSystemValuesGlobal",
"txtSystemValueName = '" & strValue & "'")

Select Case tmpValueDataType
Case "Number"
tmpValue = CDbl(tmpValue)
Case "Date"
tmpValue = CDate(tmpValue)
Case Else
End Select

getSystemValue = tmpValue

End Function
 
David

Where does these codes reside????

David C. Holley said:
Create two tables for DB administrative values (tblSystemValuesLocal,
tblSystemValuesGlobal). Local being in the FE and Global being in the
backend and linked to the front end. Each table should have the
following fields (text-type)

txtSystemValueKey
txtSystemValueDescription
txtSystemValue
txtSystemValueType

Add the following to each table:
FEVERNO
Front End Version Number
4
Number

Finally, when the FE DB starts up use the functions below to grab the
values for the VERSION NUMBER. If they match, let the FE DB continue to
start up. If they don't match, give the users a warning message.

Granted you'll have to update each and every FE to distribute the code,
but once that's done you should be fine from there. (A cheap way to
ENSURE all of the FEs are updated would be to rename the directory in
which the backend DB resides and relink the tables in the NEW FE.
Renaming the backend will break the connection to all of the old FE's
locking out everyong. :)
NOTE: The txtSystemValueType is there so that if you add aditional
values, you can figure out how to convert the text value to an
appropriate type (CDbl(), CDate(), etc.) One immediate use would be to
do a FE drop-dead upgrade date afterwhich the old FE can't be opened to
do that add another record in the tblSystemValuesGlobal table such as

DBFEExpiration
Expiration date for out dated front end versions
10/31/2005
date

You would then use the getSystemValueGlobal() and compare the result to
NOW to determine if the outdated FE should be locked out.

Function getSystemValueLocal(strValue As String)

Dim tmpValue As Variant
Dim tmpValueDataType As Variant

tmpValue = DLookup("txtSystemValue", "tblSystemValuesLocal",
"txtSystemValueName = '" & strValue & "'")
tmpValueDataType = DLookup("txtValueType", "tblSystemValuesLocal",
"txtSystemValueName = '" & strValue & "'")

Select Case tmpValueDataType
Case "Number"
tmpValue = CDbl(tmpValue)
Case "Date"
tmpValue = CDate(tmpValue)
Case Else
End Select

getSystemValue = tmpValue

End Function

Function getSystemValueGlobal(strValue As String)

Dim tmpValue As Variant
Dim tmpValueDataType As Variant

tmpValue = DLookup("txtSystemValue", "tblSystemValuesGlobal",
"txtSystemValueName = '" & strValue & "'")
tmpValueDataType = DLookup("txtValueType", "tblSystemValuesGlobal",
"txtSystemValueName = '" & strValue & "'")

Select Case tmpValueDataType
Case "Number"
tmpValue = CDbl(tmpValue)
Case "Date"
tmpValue = CDate(tmpValue)
Case Else
End Select

getSystemValue = tmpValue

End Function
 
The code to grab the system values and compare them would reside in a
SUB called from an AutoExec macro to ensure the code runs at startup.
 
Back
Top