Hitting Oracle from an ASP page

Discussion in 'ASP General' started by curious_Lee, Oct 10, 2005.

  1. curious_Lee

    curious_Lee Guest

    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??
    curious_Lee, Oct 10, 2005
    #1
    1. Advertising

  2. curious_Lee

    Turkbear Guest

    On Mon, 10 Oct 2005 11:12:43 -0400, "curious_Lee" <> 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).
    Turkbear, Oct 10, 2005
    #2
    1. Advertising

  3. curious_Lee

    curious_Lee Guest

    Art,

    Here's the other response.

    "Turkbear" <> wrote in message
    news:...
    > On Mon, 10 Oct 2005 11:12:43 -0400, "curious_Lee"
    > <> 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).
    >
    >
    curious_Lee, Oct 10, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. MattB

    hitting "enter" on a page

    MattB, May 24, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    361
    MattB
    May 24, 2004
  2. Weston Weems

    VS.NET not hitting asp.net breakpoints...

    Weston Weems, Sep 27, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    703
    Greg Burns
    Sep 28, 2004
  3. =?Utf-8?B?RENDLTcwMA==?=
    Replies:
    5
    Views:
    620
    =?Utf-8?B?RENDLTcwMA==?=
    Jan 9, 2006
  4. Abraham Luna

    hitting enter does not submit form but refreshes page?

    Abraham Luna, Sep 2, 2005, in forum: ASP .Net Web Controls
    Replies:
    5
    Views:
    319
    Abraham Andres Luna
    Oct 27, 2005
  5. Feyruz
    Replies:
    4
    Views:
    2,121
    Sherm Pendley
    Oct 14, 2005
Loading...

Share This Page