p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.

Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.

Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 18th, 2003, 01:09 AM
Authorized User
Points: 284, Level: 5
Points: 284, Level: 5 Points: 284, Level: 5 Points: 284, Level: 5
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2003
Location: islamabad, pk, Pakistan.
Posts: 72
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to zaeem Send a message via Yahoo to zaeem
Default Problem In Recordset

Hello Everybody. i have problem in the searching a particular record in the database. If records exists well and good other wise it given me the error "Either EOF Or BOF Accurd and the record has been deleted.". Secondly please assist me how can I assert paging in the code given below.Any help will be highly appreciated.
Bye
-------------------------------------------------------
set con=Server.CreateObject("ADODB.Connection")
set rs=Server.CreateObject("ADODB.Recordset")
sql="select * from book_issue where accession_no='"&ac&"'"
con.open str
rs.open sql,con,2,2
'if rs.eof<>"true" then
'''''''''How to know if the search is empty''''''''
accessionno=rs("accession_no").value
title1=rs("title").value
rs.close


Zaeem Sherazi
__________________
Zaeem Sherazi
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #2 (permalink)  
Old October 21st, 2003, 10:14 PM
Authorized User
Points: 69, Level: 1
Points: 69, Level: 1 Points: 69, Level: 1 Points: 69, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2003
Location: , , .
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default

don't know if i simplified ur problem, but u should use if-then-else statements.

<%open rs
if rs.eof=false then
*yourcode*
<% else %>
    *error message*
<%End if
close rs%>

there are many examples on the net.
a good example of paging: http://www.asp101.com/samples/db_paging.asp
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #3 (permalink)  
Old October 22nd, 2003, 02:34 AM
Friend of Wrox
Points: 1,713, Level: 16
Points: 1,713, Level: 16 Points: 1,713, Level: 16 Points: 1,713, Level: 16
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2003
Location: colombo, WP, Sri Lanka.
Posts: 467
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to surendran Send a message via Yahoo to surendran
Default

<%
if rs.RecordCount=0 then
*error message*
else
*yourcode*
end if
%>

surendran
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
problem with recordset rwahdan BOOK: Access 2003 VBA Programmer's Reference 1 March 13th, 2008 06:03 AM
Recordset Problem hugoscp Classic ASP Professional 0 July 10th, 2007 06:59 AM
recordset problem jdsflash ASP.NET 1.0 and 1.1 Basics 1 May 16th, 2006 12:49 PM
Problem with recordset am_po_28 Pro VB 6 1 August 25th, 2003 11:17 AM
Recordset problem? mobbarley ASP.NET 1.1 0 August 13th, 2003 12:42 AM



All times are GMT -4. The time now is 03:39 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc