Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> vbscript and oracle connection freezing.
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) '
' 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};DataSource=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