Signup · Login
Stardeveloper.com  
Home · Tutorials · Forums · ASP.NET Newsletter Application · Web Hosting Plans · Faisal Khan's Blog · Contact
Forums : ASP : ADO/ODBC : Deleting Files Signup · Login
Author Thread
Deleting Files
Posted in tutorial: Uploading Files into an Access Database using plain ASP
·  Brett
User
Joined: 4 Nov 2005
Total Posts: 1

Deleting Files

Posted: 4 Nov 2005
First off I must say thank you for the great tutorial. Now I know there is a comment already posted on this but I am still having trouble deleting an entry. Here is my code.

<%
Dim ID
ID = Request("ID")
if ID="" then
Response.Write "You did not select a name to delete!"
Else
Dim Rs
Dim connStr

Set Rs = Server.CreateObject("ADODB.Recordset")
connStr = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source="
'connStr = connStr & Application(dbpath) & ";"
connStr = connStr & Replace(Server.MapPath("/"), "www","db") & "/FileDB.mdb"



Rs.Open "select [File Data],[Content Type] from Files where ID = " & ID, connStr, 2, 4
Rs.Delete
Rs.Close
Set Rs = Nothing
Response.Write "Successfully Deleted"
Response.Write "<a href=""show.asp"">"
Response.Write "Return to View Files" &""
End If
%>

It works but It doesn't delete the entry it still remains there. Again thanks for the awesome tutorial. It works like a charm. And if you could help me that would be great.

Brett
Want to leave a comment? Login or Register for free!

Users Who Have Visited This Thread In Last 24 Hours
1 Visitor

Login to post a comment or start a new thread
UserName Or Email Address:       Password:       Auto-Login:    
· Create New User Account
· Send Forgotten Password by Email
 
© 1999 - 2010 Stardeveloper.com, All Rights Reserved.