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 September 9th, 2003, 10:18 PM
Authorized User
 
Join Date: Aug 2003
Posts: 78
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to spraveens
Default checking for empty recordsets !

here is my program :


<%
                'declare variables
                Dim Conn
                Dim Rs
                Dim filePath
                Dim mysql
                dim sqlstmt
                dim index
                dim temp
                dim temp1
                dim sqlstmt1



                 ' map the path of the database to a variable
                 filePath = Server.MapPath("serverdocket.mdb")
                'receive the parameter server name and save it to temp
                temp= trim(request.form("txtservername"))
                temp1=cdate(trim(request.form("txtdate")))
               ' create ado connection
                 Set Conn = Server.CreateObject("ADODB.Connection")
                 set rs= server.Createobject("ADODB.recordset")
                Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & filePath
               sqlstmt1="select * from activitysoft where servername='" &temp&"' and activitydate ='"&temp1&"'"
                ' create ado recordset
on error resume next
                 Set Rs = Conn.Execute (sqlstmt1)





 %>



<center>
<br><br><br><br><br><br>


<%
'use delete statement to delete the record

  sqlstmt = "DELETE * FROM activitysoft WHERE servername='" &temp&"' and activitydate ='"&temp1&"'"
  conn.execute(sqlstmt)





%>

'now if the variables temp and temp1 do exist ,then the record is deleted , else a message "no record found" is returned.how do I do print "no record found" when there are no matching records.
thankzzz
praveen..







Similar Threads
Thread Thread Starter Forum Replies Last Post
Checking to see if a label's text is empty mh JSP Basics 2 October 26th, 2005 11:05 AM
Checking to see if a label's text is empty mh ASP.NET 2.0 Basics 2 October 26th, 2005 10:38 AM
Help checking for empty dataset Payback ASP.NET 1.0 and 1.1 Basics 5 March 28th, 2005 05:00 AM
Checking for empty string richw32001 General .NET 1 August 8th, 2004 01:37 PM





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