If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > Periodic loss of connectivity to an Access database

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-12-02, 07:19
bbbaldie bbbaldie is offline
Registered User
 
Join Date: Dec 2002
Posts: 2
Angry 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.
Reply With Quote
  #2 (permalink)  
Old 12-12-02, 07:33
dotNetGuru dotNetGuru is offline
Registered User
 
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?

Reply With Quote
  #3 (permalink)  
Old 12-12-02, 07:53
bbbaldie bbbaldie is offline
Registered User
 
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.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On