Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: OLEDB and empty recordset error


Message #1 by "Bmp" <specialyst@n...> on Wed, 25 Jul 2001 01:23:55
I am having a problem with my web site. I have a news archieve with sql to 

filter the dates stored in my database (that ends with 01/2001  02/2002   

03/2001) etc. 

What this does is show all records in the access2k database that match the 

sql explained above therefore showing all posts for that month. 



My problem is; i am using and OLEDB connection string with the exact path 

to the db on the web server. As the site was put online for testing this 

month, the news archive for the rest of the year is empty. When i click on 

august for example i get the following error; 



ADODB.Recordset error '800a0bcd' 



Either BOF or EOF is True, or the current record has been deleted. 

Requested operation requires a current record. 



/jan.asp, line 110 





Yes the recordset is empty but it shouldn't give me an error. I have 

actually set some text on the page using the following code <% If 

augRS.EOF And augRS.BOF Then %> Sorry no news for this month <%End If%> so 

as you can see if the recordset is empty it will display that message. 

Instead it is giving me a browser error. I have tried using a standard dsn-

less string and it works fine. I dont have a clue what the problem could 

be. Any suggestions on something to try ?



Thanks in advance 

Message #2 by "Ken Schaefer" <ken@a...> on Wed, 25 Jul 2001 12:32:02 +1000
You say your code is doing this:

<% If augRS.EOF And augRS.BOF Then %> Sorry no news for this month <%End

If%>

but where is the <%Else%> condition?



<%

If augRS.EOF then

    Response.Write("Sorry no news")

Else

    ' WRITE RECORDS HERE

End If

' DO NOT write records here

%>



Cheers

Ken



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

----- Original Message -----

From: "Bmp" <specialyst@n...>

To: "ASP Databases" <asp_databases@p...>

Sent: Wednesday, July 25, 2001 1:23 AM

Subject: [asp_databases] OLEDB and empty recordset error





: I am having a problem with my web site. I have a news archieve with sql to

: filter the dates stored in my database (that ends with 01/2001  02/2002

: 03/2001) etc.

: What this does is show all records in the access2k database that match the

: sql explained above therefore showing all posts for that month.

:

: My problem is; i am using and OLEDB connection string with the exact path

: to the db on the web server. As the site was put online for testing this

: month, the news archive for the rest of the year is empty. When i click on

: august for example i get the following error;

:

: ADODB.Recordset error '800a0bcd'

:

: Either BOF or EOF is True, or the current record has been deleted.

: Requested operation requires a current record.

:

: /jan.asp, line 110

:

:

: Yes the recordset is empty but it shouldn't give me an error. I have

: actually set some text on the page using the following code <% If

: augRS.EOF And augRS.BOF Then %> Sorry no news for this month <%End If%> so

: as you can see if the recordset is empty it will display that message.

: Instead it is giving me a browser error. I have tried using a standard

dsn-

: less string and it works fine. I dont have a clue what the problem could

: be. Any suggestions on something to try ?

:

: Thanks in advance

:

: ---

: * Fast, Full-Featured Microsoft® Excel Web Reports & Charts!

: A breakthrough in high performance Web application development,

SoftArtisans

: ExcelWriter 1.1 supports native Excel charting, image insertion, and

: advanced functions & formatting. One click generates presentation-quality

: Excel spreadsheets-and ExcelWriter performs over 100 times faster than the

: Excel Object. Several editions, including ExcelWriterFREE, are available.

: http://www.softartisans.com/softartisans/excelwriter.html>




$subst('Email.Unsub')



Message #3 by Steve Carter <Steve.Carter@t...> on Wed, 25 Jul 2001 10:51:25 +0100
ooo well spotted



damn you're good!  I was going to ask for more code but I reckon you've

nailed it!



> -----Original Message-----

> From: Ken Schaefer [mailto:ken@a...]

> Sent: 25 July 2001 03:32

> To: ASP Databases

> Subject: [asp_databases] Re: OLEDB and empty recordset error

>

>

> You say your code is doing this:

> <% If augRS.EOF And augRS.BOF Then %> Sorry no news for this

> month <%End

> If%>

> but where is the <%Else%> condition?

>

> <%

> If augRS.EOF then

>     Response.Write("Sorry no news")

> Else

>     ' WRITE RECORDS HERE

> End If

> ' DO NOT write records here

> %>

>

> Cheers

> Ken

>

> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

> ----- Original Message -----

> From: "Bmp" <specialyst@n...>

> To: "ASP Databases" <asp_databases@p...>

> Sent: Wednesday, July 25, 2001 1:23 AM

> Subject: [asp_databases] OLEDB and empty recordset error

>

>

> : I am having a problem with my web site. I have a news

> archieve with sql to

> : filter the dates stored in my database (that ends with

> 01/2001  02/2002

> : 03/2001) etc.

> : What this does is show all records in the access2k database

> that match the

> : sql explained above therefore showing all posts for that month.

> :

> : My problem is; i am using and OLEDB connection string with

> the exact path

> : to the db on the web server. As the site was put online for

> testing this

> : month, the news archive for the rest of the year is empty.

> When i click on

> : august for example i get the following error;

> :

> : ADODB.Recordset error '800a0bcd'

> :

> : Either BOF or EOF is True, or the current record has been deleted.

> : Requested operation requires a current record.

> :

> : /jan.asp, line 110

> :

> :

> : Yes the recordset is empty but it shouldn't give me an error. I 

have

> : actually set some text on the page using the following code <% If

> : augRS.EOF And augRS.BOF Then %> Sorry no news for this

> month <%End If%> so

> : as you can see if the recordset is empty it will display

> that message.

> : Instead it is giving me a browser error. I have tried using

> a standard

> dsn-

> : less string and it works fine. I dont have a clue what the

> problem could

> : be. Any suggestions on something to try ?

> :

> : Thanks in advance


  Return to Index