• DBserver 1024 File Limitation Issue

    From Grzegorz R.@21:1/5 to All on Mon May 10 06:15:47 2021
    czwartek, 29 stycznia 2015 o 22:45:07 UTC+1 JohnMartens napisał(a):
    This is how I count the open servers when I close the shellwindow.
    This in case I made some code addition and forget to close one or more servers. Doesnt take long to do so.


    FOR wAlias := 1 UPTO 1024
    IF .NOT. ( ALIAS(wAlias) == NULL_STRING )
    dwMethresult += 1
    ENDIF
    NEXT

    John


    Johan Nel schreef op 29-1-2015 om 14:58:
    Chris,

    No, what I do is to have a STATIC var that basically works on the following principle:

    STATIC LOCAL aDbServers AS ARRAY

    aDbServers := {}

    Then I have a class/function/method that interacts with my open DbServers

    FUNCTION ServerOpen(sAlias AS STRING)
    IF (nPos := Ascan(aDbServers, {|a| a[1] == sAlias})) > 0
    oDb := aDbServer[nPos, 2]
    aDbServer[nPos, 3] += 1
    ELSE
    oDb := <Open your server>
    Aadd(aDbServers, {sAlias, oDb, 1})
    ENDIF
    RETURN oDb
    FUNCTION ServerClose(sAlias AS STRING)
    IF (nPos := Ascan(aDbServers, {|a| a[1] == sAlias})) = 0
    // Throw error the server is not open
    ELSE
    aDbServers[nPos, 3] -= 1
    IF aDbServers[nPos, 3] <= 0
    ADel(aDbServers, nPos)
    ENDIF
    ENDIF
    RETURN lClosed
    FUNCTION ServerGet(sAlias)
    nPos := AScan(aDbServers, {|a| a[1] == sAlias})
    RETURN aDbServers[nPos, 2]

    Basically all my interactions with servers are handled by the above three FUNCTIONS that keep track of how many references to each one is active. You have only 1 "workarea" for each DbServer.

    HTH,

    Johan

    On Thursday, January 29, 2015 at 3:19:31 PM UTC+2, CMc wrote:
    Thanks Johan. So is there an easy way to determine the total number of work areas already open? As a quick fix I could trap the error and let the user know they need to close some other windows.

    Thanks,
    Chris

    On Thursday, January 29, 2015 at 12:12:15 AM UTC-6, Johan Nel wrote:
    Chris,

    Yes this is still the limitation. You need to externalise your connections to tables into a shared collection that handles your interface to the database. Very unlikely that any process ever will need 1024 open tables to perform a task.

    Regards,

    Johan Nel
    Vulcan VIP
    Durban, South Africa.

    Hello all
    Sorry to dig old subject out but just recently I have been hit with a problem that when on one PC many windows with many DBF's have been opened (alhough far from 1024) another PC could not add a record to a particular shared DBF - Append() yelded FALSE.
    As soon as I closed some windows on another PC all returned to proper work. Where should I seek for error - is it a local app (VO 2.8) or server (QNAP file sever) limit. If it's is the app setup like in old CLIPPER (Set files = xxx) where I can change it?
    Best regards
    Gregory

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Wolfgang Riedmann@21:1/5 to All on Tue May 11 07:33:18 2021
    Hi Gregory,

    Sorry to dig old subject out but just recently I have been hit with a
    problem that when on one PC many windows with many DBF's have been
    opened (alhough far from 1024) another PC could not add a record to a particular shared DBF - Append() yelded FALSE. As soon as I closed
    some windows on another PC all returned to proper work. Where should
    I seek for error - is it a local app (VO 2.8) or server (QNAP file
    sever) limit. If it's is the app setup like in old CLIPPER (Set files
    = xxx) where I can change it?


    VO has a limit of 1023 open work areas, but since you can open the DBF
    closing a table on another PC it sounds really like a limit on your NAS (probably Linux, but maybe also Windows Storage Server if it is a
    highend NAS).

    Wolfgang


    --

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Grzegorz R.@21:1/5 to All on Tue May 11 00:28:34 2021
    wtorek, 11 maja 2021 o 07:33:21 UTC+2 Wolfgang Riedmann napisał(a):
    Hi Gregory,
    Sorry to dig old subject out but just recently I have been hit with a problem that when on one PC many windows with many DBF's have been
    opened (alhough far from 1024) another PC could not add a record to a particular shared DBF - Append() yelded FALSE. As soon as I closed
    some windows on another PC all returned to proper work. Where should
    I seek for error - is it a local app (VO 2.8) or server (QNAP file
    sever) limit. If it's is the app setup like in old CLIPPER (Set files
    = xxx) where I can change it?
    VO has a limit of 1023 open work areas, but since you can open the DBF closing a table on another PC it sounds really like a limit on your NAS (probably Linux, but maybe also Windows Storage Server if it is a
    highend NAS).

    Wolfgang


    --
    Hello Wolfgang
    Thank you. I thought so but just wanted to be sure...
    Gregory

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)