Hi all. I am currently developing an ASP application that communicates with an Oracle 9i database. Throught DotNetGnat's suggestions, I use ASP to change the ContentType of the Response to excel, and then write a simple table to generate an Excel spreadsheet.
I am running into performance issues, however. I receive a script timeout - the script timeout of the server was set to 90 seconds. So, I programatically changed this to 200, generate the output, then set back to 90. However, this is still not enough time - it still times out. I am wondering if any of you can suggest any ways I could speed up my code, or any other ideas you may have. Thanks a lot for your time.
p.s. the sql statement I'm running in this instance returns 26,929 rows.
Thanks again,
Cory
*cLFlaVA
----------------------------
[tt]your mom goes to college[/tt]
[URL unfurl="true"]http://www.coryarthus.com/[/url]
I am running into performance issues, however. I receive a script timeout - the script timeout of the server was set to 90 seconds. So, I programatically changed this to 200, generate the output, then set back to 90. However, this is still not enough time - it still times out. I am wondering if any of you can suggest any ways I could speed up my code, or any other ideas you may have. Thanks a lot for your time.
Code:
Private Function getOutput( strSql )
Dim objRS
Dim strOutput
Set objRS = objKintanaDatabase.CreateDynaset( strSql, cInt( 0 ) )
If Not objRS.EOF Then
strOutput = "<table>"
strOutput = strOutput & "<tr>"
strOutput = strOutput & "<th>Project Name</th>"
strOutput = strOutput & "<th>IT Plan #</th>"
strOutput = strOutput & "<th>Budget Entity</th>"
strOutput = strOutput & "<th>Work Item Type</th>"
strOutput = strOutput & "<th>Work Item</th>"
strOutput = strOutput & "<th>Business Unit</th>"
strOutput = strOutput & "<th>Resource</th>"
strOutput = strOutput & "<th>Resource Type</th>"
strOutput = strOutput & "<th>Time Period</th>"
strOutput = strOutput & "<th>Actual Time</th>"
strOutput = strOutput & "</tr>"
Do While Not objRS.EOF
strOutput = strOutput & "<tr>"
strOutput = strOutput & "<td>" & objRS.Fields( "project_name" ) & "</td>"
strOutput = strOutput & "<td>" & objRS.Fields( "it_plan_number" ) & "</td>"
strOutput = strOutput & "<td>" & objRS.Fields( "budget_entity" ) & "</td>"
strOutput = strOutput & "<td>" & objRS.Fields( "work_item_type" ) & "</td>"
strOutput = strOutput & "<td>" & objRS.Fields( "work_item" ) & "</td>"
strOutput = strOutput & "<td>" & objRS.Fields( "business_unit" ) & "</td>"
strOutput = strOutput & "<td>" & objRS.Fields( "user_name" ) & "</td>"
strOutput = strOutput & "<td>" & objRS.Fields( "resource_type" ) & "</td>"
strOutput = strOutput & "<td>" & objRS.Fields( "time_period" ) & "</td>"
strOutput = strOutput & "<td>" & objRS.Fields( "actual_time" ) & "</td>"
strOutput = strOutput & "</tr>"
objRS.MoveNext
Loop
strOutput = strOutput & "</table>"
End If
Set objRS = Nothing
getOutput = strOutput
End Function
p.s. the sql statement I'm running in this instance returns 26,929 rows.
Thanks again,
Cory
*cLFlaVA
----------------------------
[tt]your mom goes to college[/tt]
[URL unfurl="true"]http://www.coryarthus.com/[/url]