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

Tech-Archive recommends: Fix windows errors by optimizing your registry





I am trying to get a value from a RETURNING statement on an Oracle
database and write the result on the same ASP page, but I am getting
the error:

Error Type:
ADODB.Recordset (0x800A0CC1)
Item cannot be found in the collection corresponding to the requested
name or ordinal.
<<<>

This the code that I am using,

conn.beginTrans
sql = "INSERT INTO tbltest(REGID) Values (tbltest_SEQ.nextval )"
conn.execute SQL


sql = "Insert into tblreg_Account (REGID, Account1) Values
(tbltest_SEQ.currval, '" &strAccount &"')RETURNING REGID into
:return_REGID "
set r = conn.execute (sql)
response.write r.fields("return_REGID").value

conn.commitTrans

If I leave out :

set r = conn.execute (sql)
response.write r.fields("return_REGID").value

the code executes no problem.

I would be grateful of any pointers in how to resolve.

Regards


Tony

.



Relevant Pages

  • Re: Frontpage-Desktop-Engine-SQL
    ... When you run ASP, you're not running under the System user, or yourself, as ... as the database file is changed by the operation. ... > I got the same error message when I try to connect to a local SQL ...
    (microsoft.public.frontpage.programming)
  • DataBase results Error continued
    ... What I dont understand is that my query and output uses ... <% ' FP_ASP -- ASP Automatically generated by a Frontpage ... black;'>The Database Results component on this page is ... What it boils down to is that FP uses only one SQL ...
    (microsoft.public.frontpage.client)
  • SQL Script
    ... I have created a SQL database, a user to be used for communications in my ... ASP code, my tables, etc. Enterprise Manager gives me a way to create ... I don't really understand which scripts to create ...
    (microsoft.public.inetserver.asp.db)
  • SQL Script
    ... I have created a SQL database, a user to be used for communications in my ... ASP code, my tables, etc. Enterprise Manager gives me a way to create ... I don't really understand which scripts to create ...
    (microsoft.public.sqlserver.server)
  • How can I check if a Database Table exists?
    ... I am looking for a simple way to check if a database table exists. ... With ASP, however, I've tried the ... the SQL syntax rather than trying to figure out how to find out if the ...
    (microsoft.public.inetserver.asp.general)