|
|
Rebuild
If something goes Wrong ( Crash, Corruption, Sharing,Error Codes-49, Bad DLL calling convention )
[edit] Windows
[edit] Files from Archive[edit] Office
[edit] Database
CODE ' --------------------Example Call ---------------------- ? SYS_AC_BackupAsText(False,"D:\AS_TEXT_2010_05_08_0936_26\")
CODE References.AddFromFile "C:\WINNT\system32\scrrun.dll" [edit] Toolbars
[edit] Linked Tables[edit] Drives
CODE Option Compare Database Option Explicit Private Declare Function GetActiveWindow Lib "user32" () As Long Private Declare Function SHEmptyRecycleBin Lib "SHELL32.DLL" _ Alias "SHEmptyRecycleBinA" (ByVal hWnd As Long, _ ByVal PSZROOTPATH As String, ByVal DWGLAGS As Long) As Long Sub SysEmptyRecyclerBin() On Error GoTo LBL_xPAC_ERR Dim ln_RC As Long, oFS As Object, oDrive As Object Const SHERB_NOCONFIRMATION = &H1 Const SHERB_WITHCONFIRMATION = &H0 Set oFS = CreateObject("Scripting.FileSystemObject") For Each oDrive In oFS.Drives If oDrive.DriveType = 2 Then ' Const Fixed = 2 ln_RC = SHEmptyRecycleBin(GetActiveWindow, oDrive.DriveLetter & ":\", SHERB_NOCONFIRMATION) End If Next oDrive LBL_xPAC_END: Set oFS = Nothing Set oDrive = Nothing Exit Sub LBL_xPAC_ERR: MsgBox "Err: " & Err & "," & Err.Description, vbCritical, "SysEmptyRecyclerBin" Resume LBL_xPAC_END Resume Next Resume End Sub [edit] Directory TreeCODE MkDir "D:\MyPath" [edit] Compiled Code[edit] INI-File-SectionCODE ? SYS_AC_INI_SettingSET(cSection:="DEFAULTS", cKey:=vbNullString, cValue:="") [edit] Refresh Connection
CODE Public Function RefreshConnection(CNN As ADODB.Connection) As Boolean On Error GoTo LBL_xPAC_ERR Dim ll_RET As Boolean ' Dim oJE As JRO.JetEngine Dim oJE As Object 'JRO.JetEngine Const lkc_ProcedureName = "RefreshConnection" Set oJE = CreateObject("JRO.JetEngine") If (CNN Is Nothing) Then Err.Raise 1111, lkc_ProcedureName, "CNN Is Nothing !" Else If CNN.State = adStateOpen Then oJE.RefreshCache CNN End If End If ll_RET = True LBL_xPAC_END: Set oJE = Nothing RefreshConnection = ll_RET Exit Function LBL_xPAC_ERR: MsgBox _ "Err: " & Err & "," & Err.Description, vbCritical, lkc_ProcedureName Resume LBL_xPAC_END Resume Next Resume End Function [edit] RefreshTitleBar[edit] RefreshDatabaseWindow
[edit] Others
|
| This page was last modified 05:00, 5 February 2012. This page has been accessed 7,819 times. Disclaimers |