UtterAccess HomeUtterAccess Wiki

Welcome Guest ( Log In | Register )

Custom Search
Edit Discussion
> Rebuild    
Rebuild

Image:NotifCleanup.gif This page requires general cleanup in formatting or text to better fit the UA Wiki Guidelines

If something goes Wrong ( Crash, Corruption, Sharing,Error Codes-49, Bad DLL calling convention )
..you can Rebuild/Recreate your Database from your Backup

Contents

Windows

  • Start-Shut Down-Restart or CTRL+ALT+DELETE-Shut Down-Restart
  • Windows Update

Files from Archive

Office

Database

Reimport All objects from OLD into NEW one database , ( Ac_Menu,Import... )
CODE

' --------------------Example Call ----------------------
? SYS_AC_BackupAsText(False,"D:\AS_TEXT_2010_05_08_0936_26\")
CODE

References.AddFromFile "C:\WINNT\system32\scrrun.dll"

Toolbars

  • Ac_Menu,Customize..., Options-Tab, Reset my usage data, Toolbars are than restored to its DEFAULT state, all custom/YOUR settings are removed !

Linked Tables

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

Directory Tree

CODE

MkDir "D:\MyPath"

Compiled Code

INI-File-Section

CODE

? SYS_AC_INI_SettingSET(cSection:="DEFAULTS", cKey:=vbNullString, cValue:="")

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

RefreshTitleBar

RefreshDatabaseWindow

Others

  • Or look at some other Links
Edit Discussion
Custom Search
Thank you for your support!
This page has been accessed 22,439 times.  This page was last modified 05:00, 5 February 2012 by Jack Leach. Contributions by pacala_ba  Disclaimers