Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: SV: RE: Why doesnt my string work?


Message #1 by "SD-Studios" <info@s...> on Tue, 21 May 2002 16:05:36 +0200
The lines before are these:

SQL = "SELECT * FROM Poll_Questions ORDER BY id DESC"
objRS.Open SQL, Conn
If objRS.EOF Then
%>
No old questions available
<%
Else
counter = 0
Do While Not counter = 10

But the thing is, Im getting one record, the only one currently in the
database. Im using the same If-string on another page, same error there. Why
is this?
--
Martin Johansson
CEO & Project Supervisor
SD-Studios
+46 (0)70-3003320
http://www.sd-studios.com


-----Ursprungligt meddelande-----
Fran: Owen Mortensen [mailto:ojm@a...]
Skickat: den 20 maj 2002 21:28
Till: ASP Databases
Amne: [asp_databases] RE: Why doesnt my string work?


You're assuming that the "set objRS = "<ADOOBJECTEXEC> worked.  If there
was a failure there, then there may not be a current record and the EOF
check will fail.  What are the lines just before the if statement?

Owen

-----Original Message-----
From: SD-Studios [mailto:info@s...]
Sent: Monday, May 20, 2002 12:14 PM
To: ASP Databases
Subject: [asp_databases] Why doesnt my string work?


Im using this string to see if the Recordset is EOF or not. But it
doesnt work =(

If Not(objRS.EOF) Then

Here's the error I get:
Either BOF or EOF is True, or the current record has been deleted.
Requested operation requires a current record.

I know theres nothing wrong with the code, so it has to be the If-string
that doesnt work.. Please help me out! Thnx!
--
MVH, Martin Johansson
CEO & Project Supervisor
SD-Studios
+46 (0)70-3003320
http://www.sd-studios.com






Message #2 by "SD-Studios" <info@s...> on Tue, 21 May 2002 16:07:36 +0200
Believe me, I've tried that too.. =/
--
MVH, Martin Johansson
CEO & Project Supervisor
SD-Studios
+46 (0)70-3003320
http://www.sd-studios.com


-----Ursprungligt meddelande-----
Från: Ken Schaefer [mailto:ken@a...]
Skickat: den 21 maj 2002 04:07
Till: ASP Databases
Ämne: [asp_databases] Re: Why doesnt my string work?


<%
If not objRS.EOF then
    ' There are records
Else
    ' There are no records
End If
%>

Cheers
Ken

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "SD-Studios" <info@s...>
Subject: [asp_databases] Why doesnt my string work?


: Im using this string to see if the Recordset is EOF or not. But it doesnt
: work =(
:
: If Not(objRS.EOF) Then
:
: Here's the error I get:
: Either BOF or EOF is True, or the current record has been deleted.
Requested
: operation requires a current record.
:
: I know theres nothing wrong with the code, so it has to be the If-string
: that doesnt work.. Please help me out! Thnx!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



Message #3 by "Jeroen Diderik" <jeroen@i...> on Tue, 21 May 2002 16:27:45 +0200
You might wanna post some more code.

It's looks like you do a print of records with a counter.

Write the loop like this:

Do While Not objRS.EOF
	Response.Write objRS("Field")
	objRS.MoveNext()
Loop

Because you use a counter that goes till 10 an error will occur if there
are less then 10 records


Goodluck,
Jeroen Diderik

-----Original Message-----
From: SD-Studios [mailto:info@s...]
Sent: Tuesday, May 21, 2002 4:06 PM
To: ASP Databases
Subject: [asp_databases] SV: RE: Why doesnt my string work?


The lines before are these:

SQL =3D "SELECT * FROM Poll_Questions ORDER BY id DESC" objRS.Open SQL,
Conn If objRS.EOF Then %> No old questions available <% Else counter =3D 
0
Do While Not counter =3D 10

But the thing is, Im getting one record, the only one currently in the
database. Im using the same If-string on another page, same error there.
Why is this?
--
Martin Johansson
CEO & Project Supervisor
SD-Studios
+46 (0)70-3003320
http://www.sd-studios.com


-----Ursprungligt meddelande-----
Fran: Owen Mortensen [mailto:ojm@a...]
Skickat: den 20 maj 2002 21:28
Till: ASP Databases
Amne: [asp_databases] RE: Why doesnt my string work?


You're assuming that the "set objRS =3D "<ADOOBJECTEXEC> worked.  If 
there
was a failure there, then there may not be a current record and the EOF
check will fail.  What are the lines just before the if statement?

Owen

-----Original Message-----
From: SD-Studios [mailto:info@s...]
Sent: Monday, May 20, 2002 12:14 PM
To: ASP Databases
Subject: [asp_databases] Why doesnt my string work?


Im using this string to see if the Recordset is EOF or not. But it
doesnt work =3D(

If Not(objRS.EOF) Then

Here's the error I get:
Either BOF or EOF is True, or the current record has been deleted.
Requested operation requires a current record.

I know theres nothing wrong with the code, so it has to be the If-string
that doesnt work.. Please help me out! Thnx!
--
MVH, Martin Johansson
CEO & Project Supervisor
SD-Studios
+46 (0)70-3003320
http://www.sd-studios.com


---
Change your mail options at http://p2p.wrox.com/manager.asp or to
unsubscribe send a blank email to 



---
Change your mail options at http://p2p.wrox.com/manager.asp or to
unsubscribe send a blank email to 



Message #4 by "Owen Mortensen" <ojm@a...> on Tue, 21 May 2002 07:45:43 -0700
Is your code all on one line like you pasted it below, or on several
lines?  I would suggest splitting it to several lines, one statement per
line.  Maybe that will point to where the real error is?

Owen

-----Original Message-----
From: SD-Studios [mailto:info@s...] 
Sent: Tuesday, May 21, 2002 7:06 AM
To: ASP Databases
Subject: [asp_databases] SV: RE: Why doesnt my string work?


The lines before are these:

SQL = "SELECT * FROM Poll_Questions ORDER BY id DESC" objRS.Open SQL,
Conn If objRS.EOF Then %> No old questions available <% Else counter = 0
Do While Not counter = 10

But the thing is, Im getting one record, the only one currently in the
database. Im using the same If-string on another page, same error there.
Why is this?
--
Martin Johansson
CEO & Project Supervisor
SD-Studios
+46 (0)70-3003320
http://www.sd-studios.com


-----Ursprungligt meddelande-----
Fran: Owen Mortensen [mailto:ojm@a...]
Skickat: den 20 maj 2002 21:28
Till: ASP Databases
Amne: [asp_databases] RE: Why doesnt my string work?


You're assuming that the "set objRS = "<ADOOBJECTEXEC> worked.  If there
was a failure there, then there may not be a current record and the EOF
check will fail.  What are the lines just before the if statement?

Owen

-----Original Message-----
From: SD-Studios [mailto:info@s...]
Sent: Monday, May 20, 2002 12:14 PM
To: ASP Databases
Subject: [asp_databases] Why doesnt my string work?


Im using this string to see if the Recordset is EOF or not. But it
doesnt work =(

If Not(objRS.EOF) Then

Here's the error I get:
Either BOF or EOF is True, or the current record has been deleted.
Requested operation requires a current record.

I know theres nothing wrong with the code, so it has to be the If-string
that doesnt work.. Please help me out! Thnx!
--
MVH, Martin Johansson
CEO & Project Supervisor
SD-Studios
+46 (0)70-3003320
http://www.sd-studios.com


---
Change your mail options at http://p2p.wrox.com/manager.asp or to
unsubscribe send a blank email to 



---
Change your mail options at http://p2p.wrox.com/manager.asp or to
unsubscribe send a blank email to 




Message #5 by "Brett M. Spahr" <bspahr@g...> on Tue, 21 May 2002 09:53:39 -0500

Send me the entire asp code for your page.








-----Original Message-----
From: Owen Mortensen [mailto:ojm@a...] 
Sent: Tuesday, May 21, 2002 9:46 AM
To: ASP Databases
Subject: [asp_databases] RE: SV: RE: Why doesnt my string work?


Is your code all on one line like you pasted it below, or on several lines?
I would suggest splitting it to several lines, one statement per line.
Maybe that will point to where the real error is?

Owen

-----Original Message-----
From: SD-Studios [mailto:info@s...] 
Sent: Tuesday, May 21, 2002 7:06 AM
To: ASP Databases
Subject: [asp_databases] SV: RE: Why doesnt my string work?


The lines before are these:

SQL = "SELECT * FROM Poll_Questions ORDER BY id DESC" objRS.Open SQL, Conn
If objRS.EOF Then %> No old questions available <% Else counter = 0 Do While
Not counter = 10

But the thing is, Im getting one record, the only one currently in the
database. Im using the same If-string on another page, same error there. Why
is this?
--
Martin Johansson
CEO & Project Supervisor
SD-Studios
+46 (0)70-3003320
http://www.sd-studios.com


-----Ursprungligt meddelande-----
Fran: Owen Mortensen [mailto:ojm@a...]
Skickat: den 20 maj 2002 21:28
Till: ASP Databases
Amne: [asp_databases] RE: Why doesnt my string work?


You're assuming that the "set objRS = "<ADOOBJECTEXEC> worked.  If there was
a failure there, then there may not be a current record and the EOF check
will fail.  What are the lines just before the if statement?

Owen

-----Original Message-----
From: SD-Studios [mailto:info@s...]
Sent: Monday, May 20, 2002 12:14 PM
To: ASP Databases
Subject: [asp_databases] Why doesnt my string work?


Im using this string to see if the Recordset is EOF or not. But it doesnt
work =(

If Not(objRS.EOF) Then

Here's the error I get:
Either BOF or EOF is True, or the current record has been deleted. Requested
operation requires a current record.

I know theres nothing wrong with the code, so it has to be the If-string
that doesnt work.. Please help me out! Thnx!
--
MVH, Martin Johansson
CEO & Project Supervisor
SD-Studios
+46 (0)70-3003320
http://www.sd-studios.com


---
Change your mail options at http://p2p.wrox.com/manager.asp or to
unsubscribe send a blank email to 



---
Change your mail options at http://p2p.wrox.com/manager.asp or to
unsubscribe send a blank email to 






  Return to Index