Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2006

    Red face Unanswered: Loosing ODBC connection

    Hi all,

    We recently converted an application from accecc97 to access2003.
    We used to have 2 databases : 1 with all and only the data (axelD.mbd), 1 with all the forms, query's, ... (axelP.mdb)

    We replaced the data (axelD.mdb) with an MSDE database, through UPSIZE and so on. That all worked fine.
    This database is placed on the dataserver (DATA1), the converted programm is on the FRONT2 server (FRONT1 stil usess access97 until conversion is totally ready).

    We are able to connect to the MSDE by using ADODB recordsets.
    We are also perfect able to link the MSDEtables in our axelP.mbd database

    We started to test some heavier parts of our application and started to get the following error:

    "ERROR 3151"
    "ODBC--connection to 'JOROSOFT' failed"

    Nothing more.

    This happened in a quite complex routine, whitch updates a lot of records, several times and so on.
    We could reproduce the same error when executing the following code:

    Public Function TestBestellingen()
    Dim sql As String
    Dim intervalset As DAO.Recordset
    Dim planset As DAO.Recordset
    Dim tellerke
        x = Opendatabases()
        tellerke = 0
        sql = "Select bestelnummer from vkpbestellijn where bestelnummer > 100000"
        Set planset = Db_AxelP.OpenRecordset(sql, dbOpenDynaset)
        Do While Not planset.EOF
            tellerke = tellerke + 1
            Debug.Print tellerke & " - " & planset!Bestelnummer & " --> " & IsKlantStof(planset!Bestelnummer)
    End Function
    Function IsKlantStof(p_bestelnummer)
    Dim sql As String, rst As DAO.Recordset
    Dim hulp_klantstof As Boolean
        hulp_klantstof = False
        x = Opendatabases()
        sql = "select klantstof from vkpbestellijn where bestelnummer = " & p_bestelnummer
        Set rst = Db_AxelP.OpenRecordset(sql, dbOpenSnapshot)
        With rst
            Do While Not .EOF
                If !KlantStof = True Then
                    hulp_klantstof = True
                End If
        End With
        Set rst = Nothing
        IsKlantStof = hulp_klantstof
    End Function
    Function Opendatabases()
        If Db_AxelP Is Nothing Then
            Set Db_AxelP = DBEngine(0)(0)
        End If
    End Function
    I know this code makes no sence in a real-time environment, but it was to reproduce the error.
    This code basically runs trough a 30.000 records and does a little check for certain fields
    After 1981 records we get the above error.
    (sometimes after 1979 or 1980 or 1982 records)

    1977 - 100859 --> True
    1978 - 100860 --> True
    1979 - 100860 --> False
    1980 - 100861 --> True
    1981 - 100861 --> True
    "vkpbestellijn" is a table that is linked in the AxelP.mdb trough an ODBC connection.
    We get the same error (and after 1981 times) if I change the where to a totally other range of "bestelnummer"

    I have installed the latest patches of Jet 4.0, MSDE-server, ...

    I've been searching the internet for abour 3 days now, and just cant even find the smallest clue what could make this happen.

    I hope someone here has an idea.
    If you need more details, just ask.


    P.S. I'm from Belgium, so my english aint "correct to the point".

  2. #2
    Join Date
    Nov 2004
    on the wrong server
    Provided Answers: 6
    MSDE auto closes when the last user disconnects.

    ALTER DATABASE MyDB AUTO_CLOSE OFF might take care of this.
    “If one brings so much courage to this world the world has to kill them or break them, so of course it kills them. The world breaks every one and afterward many are strong at the broken places. But those that will not break it kills. It kills the very good and the very gentle and the very brave impartially. If you are none of these you can be sure it will kill you too but there will be no special hurry.” Earnest Hemingway, A Farewell To Arms.

  3. #3
    Join Date
    Apr 2006
    I tried that, but it didn't changed a single thing.

    The exact same problem still occurs.

    Getting desperate here.

  4. #4
    Join Date
    Apr 2006
    Is there no one around who recognises the problem or came across that problem?

    I've tried playing with the Query governor, but that didn't changed a single thing.

    The strange thing is that when i try the same code on a identically server that is in use by users, i have it less frequent.
    It looks like the MSDE server cant keep up with all the quesry's executed. And when the server has more users working, it has enough time to release some things.

    does that makes sence top anyone?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts