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 28th, 2003, 10:36 AM
Authorized User
 
Join Date: Sep 2003
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default Delete and Update Permissions

Okay so I have a page that I can pull information from my database and show it on the page. I have a page to post to the database. I also have links under the information for delete and update. The only problem is...I don't want anyone that isn't authenticated to delete or update. Here is the view page with the delete and update links.

-------------------------------
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>

<html>
<body bgcolor="black" text="red">
<p><center>For officers that would like to submit news, please <a href="Link to adding to the database that shows on this page.">login</a></center>
<center>Officers can add other officers by clicking <a href="Link to adding a different item">here</a></center></p>
<%

Dim adoCon
Dim rs
Dim strSQL

set adoCon=Server.CreateObject("ADODB.Connection")
adoCon.Provider="Microsoft.Jet.OLEDB.4.0"
adoCon.Open "My Database Connection"

set rs = Server.CreateObject("ADODB.recordset")
strSQL="SELECT News.* FROM News ORDER BY Date DESC;"
rs.Open strSQL, adoCon
%>

<%do until rs.EOF%>

   <%for x=0 to 1 %>
      <%Response.Write(rs.fields (x).value)%><br>
   <%next
Response.Write("<a href=""delete.asp?News=" & rs("NewsID") & """>")
Response.Write("Delete")
Response.Write("</a>&nbsp;")
Response.Write ("<a href=""updateform.asp?News=" & rs("NewsID") & """>")
Response.Write ("Update")
Response.Write ("</a><br><br>")
   rs.MoveNext%>

<%loop
rs.close
adoCon.close
%>
</table></body>
</html>

 
Old September 29th, 2003, 03:13 PM
Authorized User
 
Join Date: Aug 2003
Posts: 43
Thanks: 0
Thanked 0 Times in 0 Posts
Default

make a seperate database table for userID and pass. And then have a logon screen for the admin to update the pages






Similar Threads
Thread Thread Starter Forum Replies Last Post
INSERT, UPDATE, DELETE dagad ASP.NET 2.0 Professional 0 September 27th, 2006 01:22 AM
Help!!! Cannot Update, Delete from Access database dreamzentrue ADO.NET 7 November 3rd, 2005 06:11 PM
How to Update and Delete in Datagrid Through comma Rahul Gupta ASP.NET 1.x and 2.0 Application Design 1 September 30th, 2005 11:42 PM
Views-Insert/update/delete lily611 SQL Language 2 November 29th, 2004 03:41 AM
Update, insert and delete Trigger khautinh SQL Server 2000 2 September 17th, 2003 11:45 AM





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