473,406 Members | 2,371 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

ASP Oracle problem

Ok, I'll admit I'm VERY new to ASP but I simply cannot seem to get
this to work. The problem is probably obvious but I just can't seem
to find it. I'm trying to query an Oracle DB on another server but
none of my queries seem to work. What happens is that ASP/IIS times
out. In an effort to see what's really happening, I put the following
code in to see how many records were being returned by the query. In
EVERY CASE, the number of records is -1. I've even tried using
something bulletproof for my query like "SELECT SYSDATE FROM DUAL" I
know that the query shown here contains the correct table and field
names. Any help would be greatly appreciated.

In the following, the ASP/IIS times out if the "While Not..." is left
UNCOMMENTED. The line to print the recordcount was just added to
further define the problem.

<%
Dim adoConn

set adoConn = Server.CreateObject("ADODB.Connection")
adoConn.ConnectionString = "Driver={Oracle ODBC Driver};"_
& "Dbq=EMSNTSRVR.WORLD;"_
& "Uid=username;"_
& "Pwd=password"

adoConn.open
Dim result
Set result = Server.CreateObject("ADODB.Recordset")
result.ActiveConnection = adoConn
result.Open "SELECT * FROM TALONSA.OPEN_PROBLEMS", adoConn,
adOpenStatic

'While NOT result.EOF
' Response.Write result("PROBLEM_SID")
'Wend

response.write result.RecordCount

result.Close
adoConn.Close
%>
Jul 19 '05 #1
2 1782


Try using a DSN-Less connection ( it is more efficient than the ODBC one)
<%
' Create and establish data connection
Set objDC = Server.CreateObject("ADODB.Connection")
objDC.ConnectionTimeout = 15
objDC.CommandTimeout = 30

'Code to connect to Oracle Database instance
objDC.Open "Provider=MSDAORA.1;Password=secret;User ID=username;Data Source=yourtnsnamesentry;Persist Security
Info=TRUE"
%>

Also be sure the Oracle client on the IIS server's box is working correctly..


On 26 Aug 2004 12:36:34 -0700, mi**@dogstar1.com (mike) wrote:
Ok, I'll admit I'm VERY new to ASP but I simply cannot seem to get
this to work. The problem is probably obvious but I just can't seem
to find it. I'm trying to query an Oracle DB on another server but
none of my queries seem to work. What happens is that ASP/IIS times
out. In an effort to see what's really happening, I put the following
code in to see how many records were being returned by the query. In
EVERY CASE, the number of records is -1. I've even tried using
something bulletproof for my query like "SELECT SYSDATE FROM DUAL" I
know that the query shown here contains the correct table and field
names. Any help would be greatly appreciated.

In the following, the ASP/IIS times out if the "While Not..." is left
UNCOMMENTED. The line to print the recordcount was just added to
further define the problem.

<%
Dim adoConn

set adoConn = Server.CreateObject("ADODB.Connection")
adoConn.ConnectionString = "Driver={Oracle ODBC Driver};"_
& "Dbq=EMSNTSRVR.WORLD;"_
& "Uid=username;"_
& "Pwd=password"

adoConn.open
Dim result
Set result = Server.CreateObject("ADODB.Recordset")
result.ActiveConnection = adoConn
result.Open "SELECT * FROM TALONSA.OPEN_PROBLEMS", adoConn,
adOpenStatic

'While NOT result.EOF
' Response.Write result("PROBLEM_SID")
'Wend

response.write result.RecordCount

result.Close
adoConn.Close
%>


Jul 19 '05 #2
Could be a few issues:

1. Sounds like a problem with your TNSNAMES.ORA file on your IIS server.
From a command prompt, run the Oracle TNSPing utility to see if
EMSNTSRVR.WORLD resolves properly.

2. The Oracle client utilites need to be installed on the IIS server. You
should be able to connect to the Oracle server from the IIS server with SQL+.


"mike" wrote:
Ok, I'll admit I'm VERY new to ASP but I simply cannot seem to get
this to work. The problem is probably obvious but I just can't seem
to find it. I'm trying to query an Oracle DB on another server but
none of my queries seem to work. What happens is that ASP/IIS times
out. In an effort to see what's really happening, I put the following
code in to see how many records were being returned by the query. In
EVERY CASE, the number of records is -1. I've even tried using
something bulletproof for my query like "SELECT SYSDATE FROM DUAL" I
know that the query shown here contains the correct table and field
names. Any help would be greatly appreciated.

In the following, the ASP/IIS times out if the "While Not..." is left
UNCOMMENTED. The line to print the recordcount was just added to
further define the problem.

<%
Dim adoConn

set adoConn = Server.CreateObject("ADODB.Connection")
adoConn.ConnectionString = "Driver={Oracle ODBC Driver};"_
& "Dbq=EMSNTSRVR.WORLD;"_
& "Uid=username;"_
& "Pwd=password"

adoConn.open
Dim result
Set result = Server.CreateObject("ADODB.Recordset")
result.ActiveConnection = adoConn
result.Open "SELECT * FROM TALONSA.OPEN_PROBLEMS", adoConn,
adOpenStatic

'While NOT result.EOF
' Response.Write result("PROBLEM_SID")
'Wend

response.write result.RecordCount

result.Close
adoConn.Close
%>

Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: simianphile | last post by:
OK, I had a problem that I've now fixed but I can't really understand what was causing it in the first place. I have an intranet site that uses basic authentication to allow users to view and...
3
by: Harry | last post by:
Using Oracle 8i enterprise on win 2000 (sp3) Installed the standard configuration & whenever I make a connection it takes about 10 secs. It's running on a P1900 with 1gb Ram so no reason there...
1
by: Phil Hindmoor | last post by:
Hi, I am sure if anyone can help me, you guys can! I am an Informix Developer, moving to Oracle 8i and later databases. I am struggling to find the Oracle equivelant to many of the useful...
5
by: SerGioGio | last post by:
Hello, I am going nuts. I am trying to connect to my local ORACLE instance using ODBC. It used to work few weeks ago, but it fails now. Connection with: - SQL*plus: connection works! -...
4
by: Ellen K. | last post by:
Hi all, Being that so far I didn't get an answer to my below problem on the Oracle newsgroup, I figured it couldn't hurt to try here. While at my current job I've been working with mostly SQL...
11
by: Ellen K | last post by:
Hi all, I set up our Oracle Financials as a linked server to one of my SQL Server boxes. On running a test query, I got the following error message: OLE DB provider 'MSDAORA' supplied...
63
by: Nick Palmer | last post by:
Hi all, Is there a DB2 equivilant to Oracle's DB Link functionality ? I have two DB2 databases and I need to get access to the tables in one from the other. In Oracle I would just create a DB...
2
by: Steve Foo | last post by:
I have been posting this question in google group, EE, and Oracle OTN forum and still no cannot find a suitable solution for it. I have contacted Singapore Microsoft support regarding the problem...
13
by: Chris Botha | last post by:
The machine is running XP Pro with all the latest service packs, etc. I must access an Oracle database so I installed the Oracle client stuff. I can query Oracle from a Windows app, no problem....
2
by: Ruslan A Dautkhanov | last post by:
Hello ! I'm about to install O9i on FreeBSD box. uname -a: FreeBSD stat2.scn.ru 5.2.1-RELEASE-p3 FreeBSD 5.2.1-RELEASE-p3 #2: Fri Apr 23 19:19:43 KRAST 2004...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.