By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,979 Members | 960 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,979 IT Pros & Developers. It's quick & easy.

ASP-ORACLE-ADODB Performance Issue

P: 1
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

Expand|Select|Wrap|Line Numbers
  1. <%@ LANGUAGE="VBSCRIPT" %>
  2. <!-- #INCLUDE FILE="pig.asp" -->
  3. <script language="Javascript" src="getoptions.js"></script>
  4. <html>
  5. <%
  6. if (Request.Form("visitpreparationadd") = "visitpreparationadd") then
  7. '**************************
  8. '    Adding a Record
  9. '**************************
  10.     si = Request.Form("site")
  11.     nm = Request.Form("stdate")
  12.     set acom = server.CreateObject("onsite.on_st_sites")
  13.     comStat = acom.visit_preparation(si,nm) 'THIS LINE OF CODE SLOWS THE PERFORMANCE
  14.     set acom = Nothing
  15. 'Where there any errors
  16.     comStat = "0"
  17.     if comStat <> "0" then
  18.         displayerror(comStat)
  19.     end if 
  20.     set acom = server.CreateObject("onsite.on_st_sites")
  21.     comStat = acom.list_visits_date(si,nm,"Y")
  22.     set acom = Nothing
  23.     visitpreparation_add_OnSubmit = False    
  24. end if
  25. %>
  26. <head>
  27. <meta NAME="GENERATOR" Content="Microsoft FrontPage 4.0">
  28. <title></title>
  29. </head>
  30. <body background="images/onsite_bck.gif" text="#000000" vlink="#000000" alink="#000000" link="#000000">
  31. <%heading = "Visit Preparation Page"%>
  32. <table width="669" height="143">
  33.     <th width="131" align="left" height="16"><b><img src="images/images/Corporate2.gif" width="133" height="67" align="right"><br>
  34.       <br>
  35.       </b></th>
  36. <th width="524" BGCOLOR="000000" height="1"><font size="3" color="ffffff">
  37. <%if(isempty(Request.querystring("heading"))) then
  38. Response.write(heading)
  39. else 
  40. Response.Write(Request.QueryString("heading"))
  41. end if
  42. %>
  43. </font></th>
  44.  
  45. <tr><td width="131" valign="top" nowrap height="153">
  46. <!-- #INCLUDE FILE="ONSITE_ACCESS.asp" -->
  47. <!-- #INCLUDE FILE="ONSITE_DD.asp" -->
  48. </td>
  49. <td width="524" height="118" rowspan="2">
  50. <%
  51. if (Request.QueryString("visitpreparation_lst") = "yes") then
  52. %>
  53. <a href="test.asp?visitpreparation_add=yes"><img src="images/PrepaerVisits.gif" border="0"></a>
  54. <% end if %>
  55. <%
  56. '---------
  57. 'Prepare Visit
  58. '---------
  59. if (Request.QueryString("visitpreparation_add") = "yes") then
  60.     set acom = server.CreateObject("Onsite.on_st_sites")
  61.     set rs = acom.sites_lst_user()%>
  62.     <form name="visitpreparation_add" ACTION="test.asp?visitpreparation_lst=yes" METHOD="POST">
  63.     <table>
  64.     <tr><td>Site</td>          <td><select NAME="site" id="Site">
  65.         <option SELECTED VALUE="NONE">[Please Select a Site]</option>
  66.     <%while not rs.eof
  67.       if rs(0) <> strSite then %>
  68.     <option value="<%=rs(0)%>"><%=rs(1)%></option>
  69.     <%end if
  70.       rs.movenext
  71.       wend%>
  72.       <%set rs = Nothing%>
  73.     </select></td></tr>    
  74.     <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>
  75.     <input type="hidden" name="visitpreparationadd" value="visitpreparationadd">
  76.     <tr><td></td><td><input type="image" src="images/updateblack.gif" border="0" id="image1" name="image1" WIDTH="97" HEIGHT="27"></td></tr>
  77.     </form>
  78.  
  79. <% end if %>
  80.  
  81. <%if (Request.Form("visitpreparationadd") = "visitpreparationadd") then
  82.         Response.Write ("<H1><B>          Processing Completed OK</H1></B>")
  83. end if%>
  84.  
  85. <%function displayerror(errortext)%> 
  86. </td></tr>
  87. </table>
  88. <table>
  89. <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>
  90. </table>
  91. <%Response.end%>
  92. <%end function%>
  93. <script LANGUAGE="vbscript">
  94. function visitpreparation_add_OnSubmit
  95.     Dim frm1
  96.     set frm1 = Document.visitpreparation_add
  97.  
  98.     ChkDesc = "a Site Code"
  99.     set ChkField = frm1.site
  100.     if not IsSelect(ChkField, ChkDesc) then
  101.         visitpreparation_add_OnSubmit = False
  102.         Exit Function
  103.     end if
  104.  
  105.     set ChkField = frm1.stdate
  106.     if not IsFieldaDate(ChkField) then
  107.         visitpreparation_add_OnSubmit = False
  108.         Exit Function
  109.     end if
  110.  
  111.     visitpreparation_add_OnSubmit = True
  112. end function
  113.  
  114. function IsSelect(field, which)
  115.      if (field.value) = "NONE" then
  116.          sMess = "You Must Enter " & which & " - Update Cancelled"
  117.         Alert(sMess)
  118.         field.focus
  119.         IsSelect = False
  120.     else
  121.         IsSelect = True
  122.     end if
  123. end function    
  124.  
  125. function IsFieldaDate(field)
  126.     if Not IsDate(field.value) then
  127.         Alert "Entry must be a date (example 01-Jul-2001) - Update Cancelled"
  128.         field.focus
  129.         IsFieldaDate = False
  130.     else
  131.         IsFieldaDate = True
  132.     end if
  133. end function    
  134. </script>
  135. </body>
  136.  
Oct 9 '07 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.