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

Smanjivanje velicine baze

[es] :: Access :: Smanjivanje velicine baze

[ Pregleda: 1915 | Odgovora: 1 ] > FB > Twit

Postavi temu Odgovori

Autor

Pretraga teme: Traži
Markiranje Štampanje RSS

IDE

Član broj: 53403
Poruke: 586
*.crnagora.net.



Profil

icon Smanjivanje velicine baze21.10.2006. u 20:50 - pre 212 meseci
Imam jedno pitanje

Zasto kad napunim access bazu npr. na 100 MB i onda uradim
delete * from IME_TABELE_KOJA_JU_JE_NAPUNILA_TOLIKO i kada ovaj SQL upit pobrise sve iz ove tabele , baza i dalje ima velicinu 100MB??

Logicki ona bi trebalo da se smanji na nekih npr. 1MB koliko zauzimaju ostale tabele...

Dobro, kada odem kasnije na "compact and repair" (ako se sjecam, ovako se nesto zove) onda se ona stvarno smanji...

Ima li neki nacin da preko SQL upita uradim njeno smanjivanje na onu velicinu kolika bi trebala stvarno biti nakon sto obrisem ogromne tabele...??
there's something out there
waiting for us,
and it ain't no man...
 
Odgovor na temu

mika
NBG-ML

Član broj: 55
Poruke: 640
*.adsl.static.sezampro.yu.



+1 Profil

icon Re: Smanjivanje velicine baze23.10.2006. u 09:06 - pre 212 meseci
Ne može preko SQL upita da se uradi repair, ali može preko VBA koda. Evo ti primer iz helpa:

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.
Code:



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


Bolje 100 godina biti milioner nego nedelju dana siromašak
(c) Alan ford
 
Odgovor na temu

[es] :: Access :: Smanjivanje velicine baze

[ Pregleda: 1915 | Odgovora: 1 ] > FB > Twit

Postavi temu Odgovori

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