Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2002
    Posts
    2

    Angry Unanswered: Periodic loss of connectivity to an Access database

    I'm running IIS 5 on Win2k server SP3. I have created an ODBC datasource on the server, with an Access database sitting on the server with everyone modify privileges. I have created a lookup form in asp that works perfectly most of the time. However, every now and then I just lose connectivity to the database. When this happens, even a server reboot won't bring it back. Then, it will magically reappear on its own and work reliably for days. I'm the only one that knows where the database is, so nobody else has it open. Any ideas? Thanks.

  2. #2
    Join Date
    Dec 2002
    Location
    Glasgow, Scotland (or sitepoint)
    Posts
    5
    Are you closing all the connections? Could you post some of the code that deals with the database?


  3. #3
    Join Date
    Dec 2002
    Posts
    2
    This form works flawlessly 99% of the time. Then, I can't connect for some reason.

    Written through Dreamweaver, so there's a call to a file with this code:
    Dim MM_mac_STRING
    MM_mac_STRING = "dsn=mac;"

    more code:
    <%
    Dim mac1
    Dim mac1_numRows

    Set mac1 = Server.CreateObject("ADODB.Recordset")
    mac1.ActiveConnection = MM_mac_STRING
    mac1.Source = "SELECT * FROM mac_lookup ORDER BY MAC ASC"
    mac1.CursorType = 0
    mac1.CursorLocation = 2
    mac1.LockType = 1
    mac1.Open()

    mac1_numRows = 0
    %>
    <table width="97%" border="0">
    <tr>
    <td width="49%"><form name="form1" method="get" action="/asp/results.asp">
    <select name="mac" size="10" id="mac">
    <%
    While (NOT mac1.EOF)
    %>
    <option value="<%=(mac1.Fields.Item("MAC").Value)%>"><%=(m ac1.Fields.Item("MAC").Value)%></option>
    <%
    mac1.MoveNext()
    Wend
    If (mac1.CursorType > 0) Then
    mac1.MoveFirst
    Else
    mac1.Requery
    End If
    %>
    </select>
    <input type="submit" value="Submit MAC Address">
    </form></td>

    and of course

    <%
    mac1.Close()
    Set mac1 = Nothing
    %>

    Thanks.

Posting Permissions

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