Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

DB kompirmieren per VB

Empfohlene Antworten

Moin zusammen!

aaalso...

Ich kopiere regelmäßig eine DB mit der ich arbeite auf einen Server. Nun ist die DB meist 12 MB gross und wenn ich sie komprimiere ist sie nur noch 4,5 MB gross.

Meine Idee ist es nun, ein Programm oder Script zu schreiben welches die DB (Access 2000) automatisch komprimiert und dann kopiert.

Kopieren ist nun wirklich kein Thema... aber das komprimieren. Ich weiss gar nicht ob das überhaupt möglich ist. gibts da ne API oder sowas? kennt sich jemand damit aus? als Programmiersprache würde ich gerne VB 6.0 einsetzen, aber .NET wäre auch möglich.

Kann mir da jemand helfen?

Thx for help and tipps

Hmm also es wurde mir in einem anderen Form schneller geholfen (soll keine Wertung sein, ich schätze das Forum hier sehr auch wenn ich mehr lese als schreibe)

Falls nun aber wer etwas ähnliches machen möchte, oder mal danach sucht, poste ich hier mal den Code:



dim oAccess

dim oCheck

dim sFolder 

dim oFSO

dim sNewDB


const WORKDB = "C:\work.mdb"

const OLDDB = "c:\old.mdb"

const NEWFOLDER = "Z:\ZielLaufwerk+Folde"

const DBNAME = "speichername.mdb"



  sFolder = NEWFOLDER & GetDateFolder

  sNewDB = sFolder & "\" & DBNAME


  set oFSO = CreateObject("Scripting.FileSystemObject")


  if not oFSO.FolderExists(sFolder) then

    oFSO.CreateFolder sFolder

  end if 


  if oFSO.FileExists(sNewDB) then

    oFSO.DeleteFile(sNewDB)

  end if


  ' set oCheck = GetObject(,"Access.Application") 

'   

'   if not oCheck is nothing then

'     if oCheck.

'   end if


  set oAccess = CreateObject("Access.Application")

  oAccess.OpenCurrentDatabase WORKDB

  oAccess.DBEngine.CompactDatabase OLDDB , sNewDB


  oAccess.CloseCurrentDatabase 

  oAccess.Quit 2


  set oAccess = Nothing

  set oFSO = Nothing


  msgbox "Fertig"



function GetDateFolder

  GetDateFolder = cstr(year(date)) & "_" & M2D(cstr(month(date))) & "_" & M2D(cstr(day(date)))

end function


function M2D(n)

  if len(n) = 1 then

    n = "0" & n

  end if

  M2D = n

end function

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.