Hi All,
I was wondering if any of you could help me with a very difficult problem that I am having.
I have an ASP site that works with an Oracle database using an ADODB connection. This connection is stored in a .dll file. This site had been working fine.
However recently we upgraded our Oracle database from 9i to 10g and ever since then we have been having serious performance problems with this site only.
The website works fine apart from when the user does an update on the database. i.e. the site’s performance is acceptable until the user selects an option that updates the database.
I have isolated the exact line of code (see below) where the performance issue occurs and I was wondering if any one here had a similar issue and whether they could help me resolve it.
Many thanks for any help you can provide.
Colm
I was wondering if any of you could help me with a very difficult problem that I am having.
I have an ASP site that works with an Oracle database using an ADODB connection. This connection is stored in a .dll file. This site had been working fine.
However recently we upgraded our Oracle database from 9i to 10g and ever since then we have been having serious performance problems with this site only.
The website works fine apart from when the user does an update on the database. i.e. the site’s performance is acceptable until the user selects an option that updates the database.
I have isolated the exact line of code (see below) where the performance issue occurs and I was wondering if any one here had a similar issue and whether they could help me resolve it.
Many thanks for any help you can provide.
Colm
HTML:
<%@ LANGUAGE="VBSCRIPT" %>
<!-- #INCLUDE FILE="pig.asp" -->
<script language="Javascript" src="getoptions.js"></script>
<html>
<%
if (Request.Form("visitpreparationadd") = "visitpreparationadd") then
'**************************
' Adding a Record
'**************************
si = Request.Form("site")
nm = Request.Form("stdate")
set acom = server.CreateObject("onsite.on_st_sites")
comStat = acom.visit_preparation(si,nm) 'THIS LINE OF CODE SLOWS THE PERFORMANCE
set acom = Nothing
'Where there any errors
comStat = "0"
if comStat <> "0" then
displayerror(comStat)
end if
set acom = server.CreateObject("onsite.on_st_sites")
comStat = acom.list_visits_date(si,nm,"Y")
set acom = Nothing
visitpreparation_add_OnSubmit = False
response.Write("Complete")
end if
%>
<head>
<meta NAME="GENERATOR" Content="Microsoft FrontPage 4.0">
<title></title>
</head>
<body background="images/onsite_bck.gif" text="#000000" vlink="#000000" alink="#000000" link="#000000">
<%heading = "Visit Preparation Page"%>
<table width="669" height="143">
<th width="131" align="left" height="16"><b><img src="images/images/Corporate2.gif"
width="133" height="67" align="right"><br>
<br>
</b></th>
<th width="524" BGCOLOR="000000" height="1"><font size="3" color="ffffff">
<%if(isempty(Request.querystring("heading"))) then
Response.write(heading)
else
Response.Write(Request.QueryString("heading"))
end if
%>
</font></th>
<tr><td width="131" valign="top" nowrap height="153">
<!-- #INCLUDE FILE="ONSITE_ACCESS.asp" -->
<!-- #INCLUDE FILE="ONSITE_DD.asp" -->
</td>
<td width="524" height="118" rowspan="2">
<%
if (Request.QueryString("visitpreparation_lst") = "yes") then
%>
<a href="test.asp?visitpreparation_add=yes"><img src="images/PrepaerVisits.gif" border="0"></a>
<% end if %>
<%
'---------
'Prepare Visit
'---------
if (Request.QueryString("visitpreparation_add") = "yes") then
set acom = server.CreateObject("Onsite.on_st_sites")
set rs = acom.sites_lst_user()%>
<form name="visitpreparation_add" ACTION="test.asp?visitpreparation_lst=yes" METHOD="POST">
<table>
<tr><td>Site</td> <td><select NAME="site" id="Site">
<option SELECTED VALUE="NONE">[Please Select a Site]</option>
<%while not rs.eof
if rs(0) <> strSite then %>
<option value="<%=rs(0)%>"><%=rs(1)%></option>
<%end if
rs.movenext
wend%>
<%set rs = Nothing%>
</select></td></tr>
<tr><td>Date </td> <td><input type="date" name="stdate" size="10"><img src="ctdatepkon.gif" width="23"
height="22" border="0" onClick="popdate('stdate','visitpreparation_add')"></td><td>(example 20-JUL-2001)</td></tr>
<input type="hidden" name="visitpreparationadd" value="visitpreparationadd">
<tr><td></td><td><input type="image" src="images/updateblack.gif" border="0" id="image1" name="image1"
WIDTH="97" HEIGHT="27"></td></tr>
</form>
<% end if %>
<%if (Request.Form("visitpreparationadd") = "visitpreparationadd") then
Response.Write ("<H1><B> Processing Completed OK</H1></B>")
end if%>
<%function displayerror(errortext)%>
</td></tr>
</table>
<table>
<tr><td rowspan="2"><img SRC="images/erroricon.gif" ALT="You got an error"
WIDTH="96" HEIGHT="192"></td><td><b><%=errortext%></b></td><td width="25%"></td></tr>
</table>
<%Response.end%>
<%end function%>
<script LANGUAGE="vbscript">
function visitpreparation_add_OnSubmit
Dim frm1
set frm1 = Document.visitpreparation_add
ChkDesc = "a Site Code"
set ChkField = frm1.site
if not IsSelect(ChkField, ChkDesc) then
visitpreparation_add_OnSubmit = False
Exit Function
end if
set ChkField = frm1.stdate
if not IsFieldaDate(ChkField) then
visitpreparation_add_OnSubmit = False
Exit Function
end if
visitpreparation_add_OnSubmit = True
end function
function IsSelect(field, which)
if (field.value) = "NONE" then
sMess = "You Must Enter " & which & " - Update Cancelled"
Alert(sMess)
field.focus
IsSelect = False
else
IsSelect = True
end if
end function
function IsFieldaDate(field)
if Not IsDate(field.value) then
Alert "Entry must be a date (example 01-Jul-2001) - Update Cancelled"
field.focus
IsFieldaDate = False
else
IsFieldaDate = True
end if
end function
</script>
</body>
Last edited by a moderator: