ASP-Oracle Problem

Results 1 to 2 of 2

Thread: ASP-Oracle Problem

  1. #1
    Vipin Sawhney Guest

    Default ASP-Oracle Problem

    I have used the folllowing script for displaying a list from oracle<BR>database.<BR>I am using the Oracle ODBC driver and have set up the DSN for the same.<BR>When i run this asp i don&#039t get any message specific for oracle , the pc<BR>tries working for sometime and then i get a message<BR>as<BR>"The page you are looking for is currently unavailable. <BR>The Web site might be experiencing technical difficulties, or you may<BR>need to adjust your browser settings. "<BR>Let me know if anything has to be configured on the web server also (its<BR>running NT 4.0 with IIS 4.0). Database connectivity via sqlplus is<BR>working fine.<BR><BR><BR><BR><BR><BR>&#060;html&#062;&#060 ;head&#062;<BR>&#060;title&#062;jdblist.asp&#060;/title&#062;&<BR>&#060;body&#062;<BR>&#060;%@langua ge="JScript"%&#062;<BR>&#060;%<BR> var my_SQL = "select distinct state from publishers"<BR> var my_DSN = "DSN=student;uid=student;pwd=magic"<BR><BR> var objconn = new ActiveXObject("ADODB.Connection");<BR> <BR> objconn.open(my_DSN);<BR> var rstemp=objconn.execute(my_SQL);<BR> if (rstemp.eof==true)<BR> {<BR> Response.Write ("no data for<BR>");<BR> Response.Write (my_SQL);<BR> rstemp.Close<BR> rstemp=Nothing<BR> objconn.close;<BR> objconn=Nothing;<BR> Response.End<BR> }<BR>%&#062;<BR>&#060;Form&#062;&#060;Select&#062; <BR>&#060;%<BR>while (rstemp.eof==false)<BR> {<BR>%&#062;<BR> &#060;option&#062; &#060;%=rstemp(0).value%&#062; &#060;/option&#062;<BR> &#060;%<BR> rstemp.movenext();<BR> }<BR>loop<BR><BR>rstemp.close;<BR>rstemp=null;<BR> <BR><BR><BR>objconn.close;<BR>objconn=null;<BR>%&# 062;<BR><BR>&#060;/body&#062;<BR>&#060;/html&#062;<BR><BR>

  2. #2
    Javier A. Speroni Guest

    Default RE: ASP-Oracle Problem

    As I see it, you should delete the folowing lines from your Jscript<BR> rstemp.Close<BR> rstemp=Nothing<BR> objconn.close;<BR> objconn=Nothing;<BR> Response.End<BR>This lines are closing your connections to the Database and ending your response file, so after that you will never be able <BR>to do anything else.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •