473,398 Members | 2,120 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

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

I know what this error is, all fieldnames have been verified and reverified.
Not sure why it is happening.

Here is the SQL statement

strSQL = "SELECT Problems.TicketNumber, Activity, ActDate FROM Problems LEFT
JOIN Resolutions ON Problems.TicketNumber = Resolutions.TicketNumber WHERE
Problems.TicketNumber = " & Ticket & " ORDER BY ActDate DESC;"

<td><% = rs("Problems.TicketNumber") %></td>


Jul 22 '05 #1
4 3459
It'd just be called TicketNumber. Or better, use:

<td><%=rs.Fields.Item(0).Value%></td>

Ray at work

"Dthmtl" <sr**@usa.com> wrote in message
news:uk**************@TK2MSFTNGP09.phx.gbl...
I know what this error is, all fieldnames have been verified and reverified. Not sure why it is happening.

Here is the SQL statement

strSQL = "SELECT Problems.TicketNumber, Activity, ActDate FROM Problems LEFT JOIN Resolutions ON Problems.TicketNumber = Resolutions.TicketNumber WHERE
Problems.TicketNumber = " & Ticket & " ORDER BY ActDate DESC;"

<td><% = rs("Problems.TicketNumber") %></td>

Jul 22 '05 #2

"Dthmtl" <sr**@usa.com> wrote in message
news:uk**************@TK2MSFTNGP09.phx.gbl...
I know what this error is, all fieldnames have been verified and reverified. Not sure why it is happening.

Here is the SQL statement

strSQL = "SELECT Problems.TicketNumber, Activity, ActDate FROM Problems LEFT JOIN Resolutions ON Problems.TicketNumber = Resolutions.TicketNumber WHERE
Problems.TicketNumber = " & Ticket & " ORDER BY ActDate DESC;"

<td><% = rs("Problems.TicketNumber") %></td>


Hi,

enclose Problems.TicketNumber like this [Problems.TicketNumber] in the sql
statement.
Also try <%=rs(0)%>

regards
vinod
Jul 22 '05 #3
On Wed, 23 Feb 2005 15:20:44 -0500, "Dthmtl" <sr**@usa.com> wrote:
I know what this error is, all fieldnames have been verified and reverified.
Not sure why it is happening.

Here is the SQL statement

strSQL = "SELECT Problems.TicketNumber, Activity, ActDate FROM Problems LEFT
JOIN Resolutions ON Problems.TicketNumber = Resolutions.TicketNumber WHERE
Problems.TicketNumber = " & Ticket & " ORDER BY ActDate DESC;"

<td><% = rs("Problems.TicketNumber") %></td>

Response.Write the resulting strSQL to make sure there's nothing silly
about it, usually that makes the mistake apparent in my experience.

--
Iain Norman | http://www.eliteforum.org
Jul 22 '05 #4
You forgot to check field names by dumping rs(i).Name for each field.

Actually ADO uses the Table.Name notation only if there is a conflict. Else
it uses just the field name i..e. TicketNumber...

Patrice

--

"Dthmtl" <sr**@usa.com> a écrit dans le message de
news:uk**************@TK2MSFTNGP09.phx.gbl...
I know what this error is, all fieldnames have been verified and reverified. Not sure why it is happening.

Here is the SQL statement

strSQL = "SELECT Problems.TicketNumber, Activity, ActDate FROM Problems LEFT JOIN Resolutions ON Problems.TicketNumber = Resolutions.TicketNumber WHERE
Problems.TicketNumber = " & Ticket & " ORDER BY ActDate DESC;"

<td><% = rs("Problems.TicketNumber") %></td>

Jul 22 '05 #5

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

Similar topics

5
by: J. Muenchbourg | last post by:
The field name 'articleid', which is an identity/primary key , is not being recognized in my recordset as I get an " Item cannot be found in the collection corresponding to the requested name or...
2
by: CJM | last post by:
I'm running a stored procedure that inserts a record into a table then returns the Identity field value. I've done this kind of thing plenty of times in the past, but I'm obviously doing something...
8
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- ...
9
by: Gerald Lightsey | last post by:
I am doing some work that involves automating MS MapPoint 2002. The object model is documented in the context of Visual Basic 6.0. A typical example follows. 'Output first result of find...
18
by: JohnR | last post by:
From reading the documentation, this should be a relatively easy thing. I have an arraylist of custom class instances which I want to search with an"indexof" where I'm passing an instance if the...
2
by: indhu | last post by:
Hi its not working, i want only distinct record. here its repeated records coming. accdb = "SELECT DISTINCT sequence FROM scene WHERE sceneid = '" & myquery & "' " and when i select the...
2
by: anson | last post by:
this code is an example code of TPOP, i type them and can be compiled... but when give some input , it getting segment fault .... i observed that when the build() initial the word table ... it...
2
by: Sticksboy | last post by:
I keep getting this error message - Item cant be found in the collection corresponding to the requested name or ordinal I dont understand what it means to be honest. I am trying to get the code...
8
by: charli | last post by:
Error 3265, "Item cannot be found in the collection corresponding to the requested name or ordinal" code programatically opens a query using ADOX and changed the sql Dim cat As New...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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,...

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.