Wrox Programmer Forums
|
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 Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 18th, 2003, 12:09 AM
Authorized User
 
Join Date: Sep 2003
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
 
Old October 21st, 2003, 09:14 PM
Authorized User
 
Join Date: Sep 2003
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
 
Old October 22nd, 2003, 01:34 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 479
Thanks: 0
Thanked 3 Times in 3 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





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





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.