Groups | Blog | Home
all groups > inetserver asp db > october 2003 >

inetserver asp db : ADO/Access Locking Site



Brian
10/30/2003 12:40:45 PM
I've run into this problem recently and I haven't been
able to pin it on anything. I've been doing ADO
connections to Access databases for small databases
before, but now they aren't working. I've double-checked
the ASP code on two different pages, one that works and
the new one and they are completely similar, I've even
copied it over, but changed the paths. Here is a sample:

<% Do While Not rsCat.EOF %>
<!-- code here -->
<% rsCat.MoveNext
Loop %>

If I remove that part of the code the page works fine, but
obviously doesn't show anything. The problem I'm having is
that this will lock up the current site on my web server
until I restart the site. I also get a few errors in the
system event log such as Event ID 37, "Out of process
application '/LM/W3SVC/1/Root' terminated unexpectedly."
or "The Remote Procedure Call Failed and Did Not Execute."
in the browser. The only help I've come across is that a
possible Microsoft Patch for RPC could have caused it.
I've updated to MDAC 2.8 on a different web server, but it
seems to still have the same issues. The databases created
earlier and the ASP pages they use still work fine, it
seems to be anything I try to create now. Thanks in
John Beschler
10/31/2003 8:03:08 AM
Unfortunately, that is not enough info for someone to
assist you. Could you post the rest of your code?

Thanks,
John



[quoted text, click to view]
anonymous NO[at]SPAM discussions.microsoft.com
10/31/2003 8:35:55 AM
Here is the ASP code. I've tried both a direct connection
and a System DSN. It looks completely identical to my
other code that works. Could it be a bad DB, or someone
brought up possible badly-made code that used to work, but
is now not working since a Microsoft patch.

<%
Set marketingConn = Server.CreateObject("ADODB.Connection")
marketingConn.Open "Marketing"

strSQL = "SELECT * FROM Files ORDER BY Date"
Set rsStories = marketingConn.Execute(strSQL)

<% Do While Not rsStories.EOF %>
<a href="data/<%=rsStories("FileName")%>"><%
=rsStories("ShortName")%></a>
<% rsStories.MoveNext
Loop

rsStories.Close
Set rsStories = Nothing
marketingConn.Close
Set marketingConn = Nothing %>




[quoted text, click to view]
John Beschler
10/31/2003 9:12:10 AM
DATE is a reserved word. If your field is really named
Date then you should delimit it with square brackets.
strSQL = "SELECT * FROM Files ORDER BY [Date]"

See: http://support.microsoft.com/default.aspx?scid=kb;EN-
US;248738


ALSO: It is a waste of resources to use SELECT * if you do
not need all the fields from the table. If yo do need all
the fields it is safer to list each one by name in your
SELECT statement.

HTH,
John





[quoted text, click to view]
Brian
10/31/2003 11:07:45 AM
Actually, I do use most of the fields, but I kept them out
to make it simple to show you. I don't think that date is
doing it, since I've changed it to another field before
and it still locked up the site. I'll try the brackets
though, too. Thanks.

Brian

[quoted text, click to view]
Brian
11/3/2003 9:20:46 AM
I figured it out. I'm not sure if it had anything to do
with patches, but it turned out to be an empty recordset
error, but I'm not 100% sure why it was happening. I
figured out that it was getting a 3704 error, which meant
the object was closed. I've figured out how to stop the
system from locking up by (obviously, my fault) putting in
error catching. Thanks for all of the help though.

Brian

[quoted text, click to view]
AddThis Social Bookmark Button