Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> vbscript and oracle connection freezing.

vbscript and oracle connection freezing.

From: bigbinc <bigbinc_at_hotmail.com>
Date: 16 May 2003 16:11:31 -0700
Message-ID: <d1b33313.0305161511.1f0b72ca@posting.google.com>


Is there any reason why this code will not connect to my oracle database through a odbc connection. I tested the connection through an odbc connection and it was successful, but the code below keeps locking when I try to open the connection. The only problem that I can see is that my webserver and oracle database are on seperate machines and there may be a firewall problem. Could there be something wrong my tnsnames.ora/sqlnet.ora? Also, I normally use provider=? as opposed to driver=, what is the provider name for an oracle odbc connection with oracle 9.000.

Berlin Brown
bigbinc_at_hotmail.com

<%@ Language=VBSCRIPT %>

<%

' 
' For public involvement (3/28/2003)
'

option explicit
Response.Expires = -1440 ' This is to ensure that the
                      ' map logic executes for each
                      ' and every request -- that it 
                      ' is never read from browser 
                      ' cache.
                     

%>

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<HTML>
<body>

<%                  

	'Dimension variables
	Dim adoCon			
	Dim rsDistance		
	Dim strSQL
	Dim lastObjectID

	Dim connectStr
	Dim x_ctr
	
	Dim theTime
	Dim theDate

	'Create an ADO connection object
	Set adoCon = Server.CreateObject("ADODB.Connection")

	' The code below may fix unexplained errors 
	adoCon.Mode = 3			' Mode read/write

	'connectStr = "Provider=OraOLEDB.Oracle.1;Data Source=gis;;User
ID=dorsey;Password=dorsey;"
	connectStr = "Driver={Oracle in OraHome90};Data
Source=gisoracle;;User ID=x;Password=x;"

        adoCon.Open connectStr

	'Create an ADO recordset object 
	Set rsDistance = Server.CreateObject("ADODB.Recordset")
	strSQL = "SELECT * FROM DORSEY.REHABTAB ORDER BY OBJECTID"
	
	Do While not rsDistance.EOF
		
		Response.Write rsDistance(0).Value & "<br>"
		
	Loop


	'Open the tblComments table using the SQL query held in the strSQL
varaiable
	rsDistance.Open strSQL, adoCon
	
	'Reset server objects 
	rsDistance.Close 
	Set rsDistance = Nothing 
	Set adoCon = Nothing 

	

%>
        

</BODY>
</HTML> Received on Fri May 16 2003 - 18:11:31 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US