Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 31st, 2007, 11:24 AM
Registered User
 
Join Date: May 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default ADODB.Recordset error '800a0cc1'

Hi,
I have inherited a funky asp/access 'desktop inventory' system for a large hospital. I am attempting to display a 'techName' field with the following code:

<%
   dim techName
   strSql = "SELECT tblSecurity2.fldRealName, tblSecurity2.fldSecurityID FROM tblSecurity2 WHERE ((tblSecurity2.fldSecurityID)=" & techNamekey & ");"

   set rs = Server.CreateObject("ADODB.Recordset")
    rs.open strSql, DataConn
    if Not rs.EOF then
        techName = rs("tblSecurity2.fldRealName")
    end if
    rs.close
    set rs = nothing

   Response.Write "<strong>" & dateAdded & "&nbsp;@&nbsp;" & timeAdded & "&nbsp;by&nbsp;" & techName & "</strong>"

   %>

The strSql string prints out fine with a response.write command.
Similar statements compile and execute with no problem, such as:

'****** Computer Information Icon *******
strSql = "SELECT tblPCHistory.fldPC_ID, tblPCHistory.fldPCHistoryStatus, tblPCHistory.fldDateAdded, tblPCHistory.fldTimeAdded FROM tblPCHistory WHERE ((tblPCHistory.fldPC_ID)=" & fldPC_ID & ") ORDER BY tblPCHistory.fldDateAdded DESC , tblPCHistory.fldTimeAdded DESC;"
strPCIcon = "information.png"

    set rs = Server.CreateObject("ADODB.Recordset")
    rs.open strSql, DataConn

        if Not rs.EOF then
            strPCPassFail = rs("fldPCHistoryStatus")
            if strPCPassFail = "Pass" then strPCIcon = "information_green.png"
            if strPCPassFail = "Fail" then strPCIcon = "information_red.png"
        end if
    rs.close
    set rs = nothing

The error points to the 'techName = rs(("tblSecurity2.fldRealName") line.

ADODB.Recordset error '800a0cc1'

Unknown runtime error

/inventory/datamain.asp, line 977

I have placed the code in different sections to eliminate scope issues. The table is a stand-alone copy that has no dependencies. The other variables in the Response.Write line display fine since they are assigned from a different dataset.


Any clue?



Thanks for your time.
 
Old July 30th, 2007, 03:38 PM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 171
Thanks: 0
Thanked 1 Time in 1 Post
Default

Have you tried simply using the following?

techName = rs("fldRealName")





Similar Threads
Thread Thread Starter Forum Replies Last Post
ADODB.Recordset error lance Wrox Book Feedback 2 February 23rd, 2007 02:37 PM
ADODB.RecordSet -- Error nabeeljohn Classic ASP Professional 10 November 9th, 2006 05:23 AM
ADODB.Recordset error '800a0e78' nancy Classic ASP Databases 6 September 1st, 2004 09:42 AM
ADODB.Recordset error '800a0cb3' jmss66 Classic ASP Databases 1 July 16th, 2003 04:18 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.