Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

ASP.NET Forum


You are currently viewing our ASP.NET Forum as a guest. Please register to participate.
Login



Reply
Retrieve Error Message (0x800A0CC1)
Old 11-19-2004, 03:39 PM Retrieve Error Message (0x800A0CC1)
barbara's Avatar
Skilled Talker

Posts: 79
Trades: 0
the following code gives me this error message:

ADODB.Recordset (0x800A0CC1)
Item cannot be found in the collection corresponding to the requested name or ordinal.
/tutorial/function.asp, line 51 (which is this line: strConName = rs(ContactName))

i tried to disable it and go on to the next line; still the same error.


<%
'declare variables
dim strCoName, ConName, strAddress, strCity, strState, strZip, strWhichTest, strDesc, dblSample, dblSample2, dblSample3, dblSample4, dblSample5, dblSample6, strAbrasionHeadNo, TMethod, TestNotes


'connection to database
set conn=server.createobject("adodb.connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open "c:/inetpub/wwwroot/database/HTC.mdb"


sql="Select ID,CompanyName, ContactName, Address, City, State, Zipcode, Country, PhoneNumber, FaxNumber, Email, SubmitDate, SampleDesc, RequestTest, RequestTest2, AbrasionId, TestRequestNo, CustID, WhichTest, Description, Sample, Sample2, Sample3,Sample4, Sample5, Sample6, AbrasionHeadNo, TestMethod, Notes from tblCustomers, tblAbrasions where ID = CustID"
Set rs=conn.execute(SQL)


' Execute a query using the connection object. It automatically
' creates and returns a recordset which we store in our variable.

if Not rs.EOF then
rs.movefirst

strCoName=rs("CompanyName")
response.write strCoName
strConName = rs(ContactName)
response.write strConName
'strAddress = rs(Address)
'response.write strAddress
'strCity = rs(City)
'strState = rs(State)
'strZip = rs(Zip)
'strWhichTest = rs(WhichTest)

end if
rs.Close
set rs = nothing
conn.close
set conn = nothing
%>


Ii did this first: sql="Select * from tblCustomers, tblAbrasions where ID = CustID" then when i went online and search for help. One of the forum suggest to put all the variable name on the sql line, it didn't makes any differences. To ensure that i spell the name correctly, i export the column to excel then from excel to notepad to my asp pages. still didn't work.

can someone help?
barbara is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 11-19-2004, 04:18 PM
Anacrusis's Avatar
Defies a Status

Posts: 2,099
Name: Adam
Location: Colchester CT
Trades: 0
You need to put your column names in quotes when referencing them with the recordset object
eg: rs("ContactName")
Anacrusis is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Retrieve Error Message (0x800A0CC1)
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.10013 seconds with 12 queries