Hi!
One quick remark:
You should use % instead of * as a wildcard sign.
Hakan
-----Ursprungligt meddelande-----
Från: Jon Patterson [mailto:jon.patterson@s...]
Skickat: den 13 november 2001 15:40
Till: ASP Databases
Ämne: [asp_databases] RE: ASP NOT RESPONDING
Hi Craig,
We are running Service Pack 6a on our server.
I have been testing all my pages on my computer but when I transferred the
pages to the Server they don't respond. I changed the ODBC and nothing
happened.
I included code from one page of my asp app. I would appreciate it if
someone might be able to help me out with some pointers on coding.
<%
Dim objRS, strcompanyname, results, record, total, strproducts
Dim strDSN
strDSN = "DSN=WO_BE;UID=sa;PWD=pwd"
Set objRS = Server.CreateObject ("ADODB.Recordset")
objRS.Open "tblWorkOrders", strDSN, adOpenStatic, adLockOptimistic,
adCmdTable
strproducts = request.form("txtproduct")
Response.Write "<table width='520' border='1' align='center'
bgcolor='lightblue'><tr><td colspan='3'>"
Response.Write "<table width='520' border='1' align='center'
bgcolor='lightblue'><tr><td align='left' width='1%' height='1%'><img
src='workorderlogo.jpg'></td><td align='center' colspan='2'><font
face='Verdana'><div class='fixedfont2'>Work Order
Search</td></tr></table></td></tr>"
Response.Write "<tr><td colspan='4'><br><font face='Verdana'><div
class='fixedfont'><b><center>Search Results</b><br><br>"
Response.Write "<font face='Verdana'><div class='fixedfont'>You searched
for "<b>" & strproducts & "</b>"</center><br></td></tr>"
Response.Write "<tr><td bgcolor='white' align='center'><font
face='Verdana'><div class='fixedfont'><b>WO. #</td><td align='center'
bgcolor='white'><font face='Verdana'><div class='fixedfont'><b>Company
Name</td><td align='center' bgcolor='white'><font face='Verdana'><div
class='fixedfont'><b>Products</td></tr>"
record = 0
results = "productssamples LIKE '" & "*" & strproducts & "*'"
objRS.Filter = results
objRS.Find results
If Not objRS.EOF Then
While Not objRS.EOF
record = record + 1
Response.write "<tr><td align='center'
bgcolor='white'><font face='Verdana'><div class='fixedfont'><a
href=searchresults.asp?WO=" & objRS("Work_Order_No") & ">" & objRS
("Work_Order_No") & "</a>"
Response.Write "</td><td bgcolor='white'><font
face='Verdana'><div class='fixedfont'>"
Response.write objRS("companyname") & "</td><td
bgcolor='white'><font face='Verdana'><div class='fixedfont'>"
Response.write objRS("productssamples")
& "</td></tr>"
objRS.MoveNext
wend
Else
Response.Write "<br><tr><td colspan='3'
align='center' valign='middle' bgcolor='white'><br><font
face='Verdana'><div class='fixedfont'>Your Search Produced
"<b>0</b>" Results<br>"
End If
Response.Write "<br></table>"
total = record
response.write "<br><center><div class='fixedfont'><font
face='Verdana'>Your Search Returned <b>" & total & "</b> Records"
objRS.Close
Set objRS = Nothing
%>
> Are you closing all connections you make to your databases?
>
> Check that your code is not getting into a loop. Can you test to see if
any
> particular pages cause the instability?
>
> What SP are you on for NT?
>
> -----Original Message-----
> From: Jon Patterson [mailto:jon.patterson@s...]
> Sent: Tuesday 13 November 2001 15:08
> To: ASP Databases
> Subject: [asp_databases] ASP NOT RESPONDING
>
>
> i thought this would happen with pre mdac 2.0 but our NT server is
running
> MDAC 2.6 so it shouldn't have this ODBC memory leak anymore, right?
>
> the computer was just restarted yesterday and it is now not responding.
> it used to take at least 2 weeks or more before this would happen.
>
> maybe it's my open statements in asp.
>
> if anyone can help much thanks is appreciated.
>
> -jon
>
> $subst('Email.Unsub')
>
>
> _____________________________________________________________________
> This message has been checked for all known viruses by Star Internet
> delivered through the MessageLabs Virus Scanning Service. For further
> information visit http://www.star.net.uk/stats.asp or alternatively call
> Star Internet for details on the Virus Scanning Service.
>