Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.

Compact.. BackEnd baze

[es] :: Access :: Compact.. BackEnd baze

[ Pregleda: 3191 | Odgovora: 2 ] > FB > Twit

Postavi temu Odgovori

Autor

Pretraga teme: Traži
Markiranje Štampanje RSS

sbing
Hr

Član broj: 48455
Poruke: 77
*.cmu.carnet.hr.



Profil

icon Compact.. BackEnd baze17.01.2006. u 16:42 - pre 173 meseci
Da li netko zna, da li se može, i kako da napravim 'Compact and Repair Database' na BackEnd bazi, sa FrontEnd baze? Jer nema skoro nikakve svrhe da korisniku na neki svoj menu stavim opciju Compact.. kad se on izvrši samo na FrontEnd dijelu baze. Ja bi htjeo da se to izvrši i na BackEnd-u. Da li je to ikako moguće? Isto tako i opcija u Accessu 2003 'Back Up Database', da li je moguće da se nekako napravi za BackEnd?
 
Odgovor na temu

Zidar
Canada

Moderator
Član broj: 15387
Poruke: 3085
*.eqao.com.



+78 Profil

icon Re: Compact.. BackEnd baze18.01.2006. u 19:22 - pre 173 meseci
Access Help:
Citat:

CompactRepair Method
See Also Applies To Example Specifics
Compacts and repairs the specified database (.mdb) or Microsoft Access project (.adp) file. Returns a Boolean; True if the process was successful.

expression.CompactRepair(SourceFile, DestinationFile, LogFile)

expression Required. An expression that returns one of the objects in the Applies To list.

SourceFile Required String. The full path and filename of the database or project file to compact and repair.

DestinationFile Required String. The full path and filename for where the recovered file will be saved.

LogFile Optional Boolean. True if a log file is created in the destination directory to record any corruption detected in the source file. A log file is only created if corruption is detected in the source file. If LogFile is False or omitted, no log file is created, even if corruption is detected in the source file.

Remarks
The source file must not be the current database or be open by any other user, since calling this method will open the file exclusively.

Example
The following example compacts and repairs a database, creates a log if there's any corruption in the source file, and returns a Boolean value based on whether the recovery was successful. For the example to work, you must pass it the paths and file names of the source and destination files.

Function RepairDatabase(strSource As String, _
strDestination As String) As Boolean
' Input values: the paths and file names of
' the source and destination files.

' Trap for errors.
On Error GoTo error_handler

' Compact and repair the database. Use the return value of
' the CompactRepair method to determine if the file was
' successfully compacted.
RepairDatabase = _
Application.CompactRepair( _
LogFile:=True, _
SourceFile:=strSource, _
DestinationFile:=strDestination)

' Reset the error trap and exit the function.
On Error GoTo 0
Exit Function

' Return False if an error occurs.
error_handler:
RepairDatabase = False

End Function


 
Odgovor na temu

sbing
Hr

Član broj: 48455
Poruke: 77
*.cmu.carnet.hr.



Profil

icon Re: Compact.. BackEnd baze18.01.2006. u 19:53 - pre 173 meseci
Hvala ti Zidar, ovo je čisti primjer da ponekad treba zaviriti u taj help. Živio help!
 
Odgovor na temu

[es] :: Access :: Compact.. BackEnd baze

[ Pregleda: 3191 | Odgovora: 2 ] > FB > Twit

Postavi temu Odgovori

Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.