Item Cannot Be Found In The Collection Corresponding ...
This is my SQL Query, but I get the error message. Item cannot be found in the collection corresponding to the requested name or ordinal.
/spmanagerdownload/downloadadmin.asp, line 444
This is my SQL Query, but I get the error message. Item cannot be found in the collection corresponding to the requested name or ordinal.
/spmanagerdownload/downloadadmin.asp, line 444
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 wrong this time..
I've tested the Stored Proc in QA and it works fine. The SQL code runs OK in
ASP (iAffected = 1 which shows the record is inserted), but when I try to
query the resulting recordset, I get an error:
"Item cannot be found in the collection corresponding to the requested name
or ordinal. " Code:
I am using VBscript in ASP. I am trying to address one file in a folder object.
Set MyDirectory=Server.CreateObject("Scripting.FileSystemObject")
' MyFolders is contents of folder containing photos.asp
Set MyFolders=MyDirectory.GetFolder(Server.MapPath("./"))
Then I try to access the first file in the "MyFolder"
I tried
1. Set filefound=MyFiles.files.item(1)
2. Set filefound=MyFiles.files(1)
3. Set filefound=MyFiles.files[1]
Neither work. There is compilation error.
But
For each filefound in MyFiles.files
works
"myfiles.files" is a collection object of file objects, isn't it?
in my asp file i get the following error
Error Type:
ADODB.Recordset (0x800A0CC1)
Item cannot be found in the collection corresponding to the requested name or ordinal.
/emirate/view.asp, line 175
my database is access,i checked both data base as well as the coding,both field names are correct
my sql is only this
sql= "select * from MasterEntry"
have a look at this code and see if they can spot the error. I've been looking for sometime but I'm blind to it - I have a feeling it might be something to do with the ID field? The connection appears fine so this is unlikely to be the cause .
View Replies View RelatedI 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>
I'm getting this error working on a RecordSet that is filled by a LEFT JOIN query. Everything works fine, until an attempt to access data from the child table in the RecordSet when it doesn't exist.
Which results in "Item cannot be found in the collection". Is there a check that I can perform to see if a RecordSet item exists before attempting to access it?
I am receiving the following error when I try calling a variable back from SQL Server 2005.
**********************
ADODB.Recordset error '800a0cc1'
Item cannot be found in the collection corresponding to the requested name or ordinal.
/etms/WorkFlow/ProductWF/Components.asp, line 193
**********************
The query works fine when i execute it from SQL server but when I integrate it into ASP it doesn't work. Can anyone please shed some light on this. Code:
the query works sometimes, but then after a few it wont work. Its a DB2 database, just creating a report page.
Error:
ADODB.Recordset error '800a0cc1'
Item cannot be found in the collection corresponding to the requested name or ordinal.
Code: error is on line 93 which reads: Code:
does anyone know how to define own Collection objets in ASP (not
ASP.NET!) and VBScript? Is it better to use the Collections or the
"Scripting.Dictionary" object?
I am doing a project and I have a form in which I am putting information inside cookies then I am to display the information in the cookies on another page. So when they click submit they goto this page and this is my code:
View Replies View RelatedHow to pass a collection from a VB Component to an ASP page? I have no clue
the syntax of all. Code:
I found this piece of code to collect info from a form and then display the information.
I created seperate programs - one with the form and the other with the asp part to display the collected information.
How can I collect information in one program using "post" method and display it and get an okay from my users before I update the database? Code:
I am processing a form and I want to double check that a field is defined so that no error occurs. How do I check if a key exists in a collection (the Request.Form collection)?I do not want to process all of the fields in the form, so I do not want to use "For Each x In Request.Form". I process a certain list of fields and just in case the field was left out, I want to prevent an error from occurring from trying to use a key that does not exist.
Code:
For Each x In arrayFields 'arrayFields contains certain field names
'verify that field actually defined
If [field is a key in the Request.Form collection] Then
stringTemp = Request.Form(x)
'do stuff
End If
Next
How is it possible to instantiate an new collection in asp serverside?
View Replies View RelatedI'm looking for a template "add / delete" collection box... where one could browse to a file ... click add and that file gets added to the collection
the same operation can be done to delete from the list... i guess similar to the basic functionality to a shopping cart..
I like how you can use the Fields collection to create tables but is there a way to dynamically produce a table and filter out certain fields without having to write the entire table out manually? For example, I don't need the record's ID field in the table.
View Replies View RelatedI'm working on an ASP/Javascript page with frames, and I need to access the properties of an image in the "top" frame from a script launched by the "middle" frame.
When changing the properties in the current frame, I use
document.images.image3.src = picArray[randomNumber]
Of course, that only works if image3 is in the current frame. Is there a Frames collection that I can use to access stuff in another frame?
I would like to tap in to all the brilliant minds out there through the means of this question. Is it possible to have a function in asp that returns a collection of items?
If so could you please direct me to some code that may provide some insight to how its done. I've tried using my limited coding capacity but no success.
I want to expire a cookie collection in my asp page and I gave it like this;
Response.Cookies("whereq").Expires = Now()
and this "whereq" collection has 50 keys. The problem is my cookie didn't expire from the above code. I hope there should be a way to do so without writing 50 expire lines.
How can I retrieve the values one by one from a variable
like this: chgID=48, 51, 52, 53, 54, 56, 57, 59, 58, 46, 61, 60
Actually I am getting this, from a form and I want to update records
in database filtering with these IDs one at a time. I guess 'For Each'
loop can do this work done, but How??
I am trying to create a string that is cencatenated from values in a form. The form pulls in the values in a reocordset and displays each record in a row with a checkbox.
I want to cencatenate the values of the ProjectName field if the checkbox (isChecked) has been checked when the form is submitted. Here is the code that i am using:
<%
If (Request.Form("Submit") <> "") Then
Dim Criteria
Criteria = ""
For Each Item in Request.Form("ProjectName")
If Request.Form("IsChecked") Then
Criteria = Criteria & Request.Form("Projectname")
Else
Next
Response.write Criteria
End If
%>
If I get rid of the If then else statement with in the For Each statement, then all of the items will cencatenate. I am just trying to grab the rows where the user has checked in the box for the row.
can anyone tell me why it is that when i do (see the code>)
1 the value of the submit button doent match?
2 the collection returns the collection string as line one?
3. how do i jump these 2 for error check and trim replace?
Code:
Is there a way to manipulate (ie change) the items in the forms
collection. I simply want to get rid of the infamous apostrophe in input
from a form, replace ' with ''. I had hoped to be able just to make the
change and then put it back into the Form.item. Is there a way to do
this?
If not, would the best way to save the result be to build an array,
which is then used instead of the forms collection? Code:
I have several hundreeds of DVDs, and friends often call
me to borrow some.
I'd like to be able to have my entire collection on my
web page (i have everything in a database already) and
let them browse for the title they want, then "check" the ones
they need and see if they're "available" or not.
Then this would send me an email with the titles and the name
of the person requesting them.
Is there any ready to use solution or should I just jump into
developing it myself?
If there is something, any link to a product like that?
Something simple: title, cover picture, available or not.
I have an asp page in which i have a combo,in change of selected index of combo i am putting the combo value to a hidden variable then submitting the form like this
form.hid.value=1
form.target;
form.submit
and again while loading the form i am checking for the value like this .request.form("hid") but i am not getting the value .what could be the problem.the method of my form is post only.
I have an asp application that I install on quite a few different servers. omally this works fine and I have never had a serious issue with it untill today.I installed the site in the normall way and was able to browse to it. But as soon as I submitted one of the forms in a page, nothing gets passed through the forms collection.
I found this strange and immedatly placed in code to iterate through the collection and display all of the values, but the collection is empty and no variables have been passed at all.
has anybody experinced this issue before and know how to fix it, I have been looking through setting in IE as I though a security update may have changed something, I'm not too sure if this is a browser issue or an IIS issue.
Is the garbage collection algorithm used in JavaScript on ASP based on reference counting or tracing? (I'm planning on creating some user defined Objects with lots of cyclic references (e.g., a.next.prev = a), and would like to know if this will cause a problem for the garbage collector. The fact that garbage collection in general isn't instantaneous suggests to me that it isn't based on reference counting, but I just want to be sure.)
View Replies View RelatedI have a VB6 ActiveX DLL that we use for printing. It iterates through
the printers collection to set the printer to the one the user
requested. This is called from ASP (VB Script) pages, and from a VB
Web Class application. The problem is, sometimes the printers
collection is empty, so it fails to print.
The COM+ package is configured to run as a known user. This user has
printers configured. If we logon to the Web Server as the known user,
and restart component services, then the printers appear and it all
works. if we leave the console logged on, it keeps working. If we log
the console off, then at some point (overnight), it 'forgets' the
printers.
We now have a customer where leaving the console logged on is not an
option. And they do not want to logon to 'kick start' it. The first
users come in early in the morning, before IT is at work to resolve
teh porblem.
This is occuring on Windows 2000 Server, and on Windows 2003 server.
I have tried:
- Searching the web.
- Using EnumPrinters instead. This gives the local pronters, but not
the network pronters.
- (I am trying) using OpenPrinter first.
- I have tried to find a way to force the DLL to initialise the
security, without success.
I was wondering if there was a way to pass the entire collection of ASP
Session variables into a COM function.
Inside COM, I need to have something like
Public Function ProcessVars(ByRef Session as <SomeSessionVarType>)
End Function
Which reference do I need to include in my VB6 project?
While programming in ASP.NET, I'm used to copying out all the contents of the Form collection of the page's Request object, then emptyting the Request.Form collection itself so all my user-supplied values are safe in my "protected" Session Object. I often do the "emptying" with the Request.Form.RemoveAll() method
However, this time around, I'm creatng an ASP 3.0 application (not ASP.NET), and I'd like to reproduce similar functionality. It seems there's no such method as Request.Form.Remove() or Request.Form.Contents.Remove() as I thought I'd find. Can anybody help me with this, or do I have to just stick to my Request.Form collection, since there'd be no point copying out all the values into Session variables if I can't empty the Request.Form collection?
I'm trying to retrieve 2 values from a table (product stocknumber & description) that match a form result (product ID number) to send with the "form results email". Not quite sure how to do this. Code:
View Replies View Relatedin my mail sending page i'm getting the following error
Cannot use Request.Form collection after calling BinaryRead.
can enyone explain y i'm getting that error
here's my coding where i get the error
str2 = split(Request.form("C1"),",")
i use the above code to get multiple checkbox values for getting the id's of the users to whom the mail should send
here the mail sending works as a loop while the attachemnt also attached to the mail