2
由於我處於開發模式,我的前端需要大量更新。 這是我的功能檢查版本,當用戶試圖在前端的開口道:計時器每30分鐘運行一次代碼
Public Function FEPath(DBName As String)
Dim Conn As New ADODB.Connection
Dim DataConn As New ADODB.Recordset
Dim Comm As String
Dim strPath As String
Dim strDB As String
Dim strVer As String
Dim strExt As String
Comm = " SELECT tblFE.Database, tblFE.Version, tblFE.Extension " & _
" FROM tblFE WHERE tblFE.[Database] = '" & DBName & "';"
Set Conn = CurrentProject.Connection
DataConn.Open Comm, Conn, adOpenKeyset, adLockOptimistic
With DataConn
strDB = ![Database]
strVer = ![Version]
strExt = ![Extension]
strPath = "C:\Databases\" & strDB & " " & strVer & strExt
.Close
End With
Set Conn = Nothing
我需要以某種方式運行一塊每30分鐘的代碼,而前端是開放的,以檢查以查看是否有可用於上傳的新前端版本。然後我會通知用戶,關閉數據庫並更新到新版本。現在,版本更新總是在數據庫打開時發生。如何才能做到這一點?
謝謝。