473,466 Members | 1,360 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Hitting Oracle from an ASP page

An error keeps popping up on my ASP application connecting to an Oracle 9i
database via a SELECT statement:

Item cannot be found in the collection
corresponding to the requested name or ordinal.

However, if I put it an "On Error Resume Next", it works fine, and is able
to return the value in question. The SELECT also works fine on the database
itself. Here's the SELECT,

sqlstr = "select f_get_dept_name('123') dept_name from myschema.tbl_xyz"

sqlstr = sqlstr & " where tbl_xzy_id = 4567"

What in the world is going on??
Oct 10 '05 #1
3 1204
On Mon, 10 Oct 2005 11:12:43 -0400, "curious_Lee" <on***************@yahoo.com> wrote:
An error keeps popping up on my ASP application connecting to an Oracle 9i
database via a SELECT statement:

Item cannot be found in the collection
corresponding to the requested name or ordinal.

However, if I put it an "On Error Resume Next", it works fine, and is able
to return the value in question. The SELECT also works fine on the database
itself. Here's the SELECT,

sqlstr = "select f_get_dept_name('123') dept_name from myschema.tbl_xyz"

sqlstr = sqlstr & " where tbl_xzy_id = 4567"

What in the world is going on??


Can you post the line that causes the error..Also, have you run the Sql created by the code directly?

( Use a Response.Write(sqlstr) to see exactly what is being sent to the database).
Oct 10 '05 #2
The fact that it appears to work when specifying "ON ERROR RESUME NEXT" suggest
that your "select" statement is working fine.

I suspect the error is being recorded later on in your code, when you try to
use a "column" in that recordset. I think you may be trying to accesss a column
that has not been retrieved in the SELECT statement...or you have a spelling
mistake...or the "case" of the column name may be wrong.

Brian

Oct 10 '05 #3
Art,

Here's the other response.

"Turkbear" <no***@nowhere.com> wrote in message
news:vf********************************@4ax.com...
On Mon, 10 Oct 2005 11:12:43 -0400, "curious_Lee"
<on***************@yahoo.com> wrote:
An error keeps popping up on my ASP application connecting to an Oracle 9i
database via a SELECT statement:

Item cannot be found in the collection
corresponding to the requested name or ordinal.

However, if I put it an "On Error Resume Next", it works fine, and is able
to return the value in question. The SELECT also works fine on the
database
itself. Here's the SELECT,

sqlstr = "select f_get_dept_name('123') dept_name from myschema.tbl_xyz"

sqlstr = sqlstr & " where tbl_xzy_id = 4567"

What in the world is going on??


Can you post the line that causes the error..Also, have you run the Sql
created by the code directly?

( Use a Response.Write(sqlstr) to see exactly what is being sent to the
database).

Oct 10 '05 #4

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

Similar topics

5
by: jrefactors | last post by:
My machine is Windows XP with Oracle 9.2 Home; IIS and Oracle are in the same box. I have tried both Oracle OLEDB Provider and Microsoft ODBC For Oracle, but both not working. For Microsoft...
2
by: 23s | last post by:
My site's login page has a form w/ 2 textboxes and a submit button. If I'm in either of those textboxes (i.e., either one of the textboxes has focus), in any given browser, hitting "enter" on my...
8
by: danbredy | last post by:
Hi, I'm attempting to connect to an Oracle database using SQL Server 2005 Express (OS is Windows XP Professional) and having absolutely no luck. Here is the information SQL Plus gives me about...
5
by: DCC-700 | last post by:
I am using ASP.Net with VB on the 1.1 Framework running on Win XP Pro. I am trying to gauge the time it takes to sort a datagrid using different code sets. But when I am debugging the page there...
19
by: windandwaves | last post by:
Hi Folk I am managing a site, www.friars.co.nz that seems to be hitting the limits and I keep getting the 500 error. According to the people from webfarm it is because my script are too...
0
by: MartyN | last post by:
I have a Windows 2000 machine (running IIS) which I upgraded from the Oracle 8i client to the 10g client. I did the whole "Oracle uninstall/reboot/manual file delete/manual registry editing/reboot"...
2
by: Vinod Sadanandan | last post by:
All, Below listed are the new features in Oracle 11g ,please join me in this discussion to generate a testcase and analyze each of the listed features . Precompilers:...
2
by: Sunfire | last post by:
I was wondering if there was a way to hit enter to insert blank lines while in the designer? I tried this but all it seems to want to do is insert code that really shouldn't be there. For example,...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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,...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.