473,396 Members | 1,915 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,396 software developers and data experts.

exception '80020009'

When i try to execute this cycle:

<%while not (oRS("IDFoto")=IDFoto)
IDPrec=oRS("IDFoto")
oRS.MoveNext
wend%>

i get the error:
80020009 Exception Occurred

I want to select the record with the field IDFOTO= the value in the variable
IDFoto
I'm sure the cycle doesn't work, if i modify it so:

while (oRS("IDFoto")=IDFoto)

it works (but with no right result of course)

Does anyone can help me??

Thanks

Marco
Jul 19 '05 #1
1 2091
Marco wrote:
When i try to execute this cycle:

<%while not (oRS("IDFoto")=IDFoto)
IDPrec=oRS("IDFoto")
oRS.MoveNext
wend%>

i get the error:
80020009 Exception Occurred

I want to select the record with the field IDFOTO= the value in the
variable IDFoto
I'm sure the cycle doesn't work, if i modify it so:

while (oRS("IDFoto")=IDFoto)

it works (but with no right result of course)

Does anyone can help me??

Thanks

Marco


Why are you using a loop to find a record? Finding records is what queries
were designed to do very efficiently. I suggest adding this search criterion
to the query that you use to open the recordset.

If for some reason you need to retrieve records in addition to the records
that meet this search criterion, then use the recordset's Find method to get
the record.

If IDFoto is a text/char field:
oRs.Find "IDFoto='" & IDFoto & "'"

If numeric:
oRs.Find "IDFoto=" & IDFoto

Here is the documentation on the Find method:
http://msdn.microsoft.com/library/en...dmethodado.asp

If there are multiple records that meet the criteria, use the Filter
property instead:
http://msdn.microsoft.com/library/en...asp?frame=true

You will need to use a cursor that supports bookmarks (adOpenStatic) in
order to use these methods.

HTH,
Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jul 19 '05 #2

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

Similar topics

0
by: olivier Micheli | last post by:
Hello, I need help When I execute the following asp, I have the error message: ------------------------------- ADODB.Field error '80020009' BOF ou EOF est égal à True ou l'enregistrement...
5
by: Tim Chmielewski | last post by:
The following code is meant to take records from a database and write them to a file in a comma delimited CSV format: Set fso = CreateObject("Scripting.FileSystemObject") filename1 = FilePath &...
0
by: psaban | last post by:
Getting an exception occurred error with the following code: Dim rgstcustConnect 'as Connection set rgstcustConnect=server.createobject("adodb.connection") rgstcustConnect.open...
0
by: M Naeem Baig | last post by:
I have the following asp code running well on win 2000 (sp4 installed). But the same code on windows 2003 is giving error '80020009'. Dim Conn, strRS, RS, strConn Set Conn =...
5
by: Mark | last post by:
All across my site i am getting 0x80020009 errors every so often. they point to lines of code like where FolderNAMEIN is a string such as "Botswana" and the VarFolderNameLength is 150 if...
1
by: Chris | last post by:
I get the follow error on a linux box that is running sun asp: CDONTS.NewMail.1 error '80020009' unable to connect to server The error occurs when the Send Command is Executed. Here is my code...
2
by: dmiller23462 | last post by:
Hey guys, I'm back again....I've got the results displaying that I wanted but instead of having a "next" or "previous" link displayed I am getting the error msg below (I actually get the data that...
2
by: SayMyName | last post by:
Due to my browser being danishm the error message will not mean much t most of you. It is an "Unspecified problem" with "Provide (0x80004005)" POST Data: error '80020009' The error only arrives...
1
by: Redeye | last post by:
Hello, I have created an ASP page that calls a local webservice. Everything works fine on my system but once it is deployed to the server I get the following error. WSDLReader error...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.