🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: pl.comp.bazy-danych.msaccess
3 messages
3 total messages Started by Xylo Mon, 02 Nov 2015 09:36
Błąd 2004 Access
#137026
Author: Xylo
Date: Mon, 02 Nov 2015 09:36
35 lines
2474 bytes
Witam !
Korzystam w moim accessie 2003 / Win 7 z funkcji

Function SystemOnline(ByVal ComputerName As String)
     ' This function returns True if the specified host could be pinged.
     ' HostName can be a computer name or IP address.
     ' The Win32_PingStatus class used in this function requires Windows XP or later.
     ' Standard housekeeping
    Dim colPingResults As Variant
    Dim oPingResult As Variant
    Dim strQuery As String
     ' Define the WMI query
    strQuery = "SELECT * FROM Win32_PingStatus WHERE Address = '" & ComputerName & "'"
     ' Run the WMI query
    Set colPingResults = GetObject("winmgmts://./root/cimv2").ExecQuery(strQuery)
     ' Translate the query results to either True or False
    For Each oPingResult In colPingResults
        If Not IsObject(oPingResult) Then
            SystemOnline = False
        ElseIf oPingResult.StatusCode = 0 Then
            SystemOnline = True
        Else
            SystemOnline = False
        End If
    Next
End Function

w ten sposób sprawdzam pingiem czy mam urządzenia w sieci.
Niestety po około dwóch godzinach wywala mi błąd 2004

Brakuje pamięci aby wykonać operację, zamknij niepotrzebne aplikacje i spróbuj ponowić operację

Pracuje sam access, muszę z menadżera zadań zakończyć accessa i uruchomić od nowa.
Dlazcego ?
Proszę o podpowiedzi i pomoc
Re: Błąd 2004 Access
#137027
Author: Radosław Biernacki
Date: Tue, 03 Nov 2015 09:45
39 lines
3099 bytes
W dniu poniedziałek, 2 listopada 2015 10:36:47 UTC+1 użytkownik Xylo napisał:
> Witam !
> Korzystam w moim accessie 2003 / Win 7 z funkcji
> 
> Function SystemOnline(ByVal ComputerName As String)
>      ' This function returns True if the specified host could be pinged.
>      ' HostName can be a computer name or IP address.
>      ' The Win32_PingStatus class used in this function requires Windows XP or later.
>      ' Standard housekeeping
>     Dim colPingResults As Variant
>     Dim oPingResult As Variant
>     Dim strQuery As String
>      ' Define the WMI query
>     strQuery = "SELECT * FROM Win32_PingStatus WHERE Address = '" & ComputerName & "'"
>      ' Run the WMI query
>     Set colPingResults = GetObject("winmgmts://./root/cimv2").ExecQuery(strQuery)
>      ' Translate the query results to either True or False
>     For Each oPingResult In colPingResults
>         If Not IsObject(oPingResult) Then
>             SystemOnline = False
>         ElseIf oPingResult.StatusCode = 0 Then
>             SystemOnline = True
>         Else
>             SystemOnline = False
>         End If
>     Next
> End Function
> 
> w ten sposób sprawdzam pingiem czy mam urządzenia w sieci.
> Niestety po około dwóch godzinach wywala mi błąd 2004
> 
> Brakuje pamięci aby wykonać operację, zamknij niepotrzebne aplikacje i spróbuj ponowić operację
> 
> Pracuje sam access, muszę z menadżera zadań zakończyć accessa i uruchomić od nowa.
Tak po amatorsku :) 
Access ma tendencje do "puchnięcia" w takich sytuacjach. 
Na Twoim miejscu po prostu co jakiś czas bym ją zamykał (harmonogram zadań) i defragmentował. U mnie pomaga. 

Wiem, że to nieprofesjonalne :(
Re: Błąd 2004 Access
#137028
Author: Xylo
Date: Wed, 04 Nov 2015 10:35
1 lines
1246 bytes
Dzięki za podpowiedź.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads