HI can any body give me a program for delete a online file in asp. Actually I have created a program for mail attachment. For attaching the file first of all I have to upload the file in a directory but after sending attach file the file should be remove from directory.
I need to delete files across the network using web client (IE 6.x) in Win 2003 - IIS 6.0 environment.suggest an approach I can use to acheive this.Will using FSO do the job or I have to go COM way.
what r things that I have to do to let the client browser to delete a file on the server. I'm running my server on WIN2000 pro, IIS 5.0. I've stored my website and server in a virtual directory. This is the code i use to delete a file from the server folder
Code:
Function delete_file(exceldb) '***************** Delete********************** Set fso = CreateObject("Scripting.FileSystemObject") Set fileObject = fso.GetFile(Server.MapPath("..upload2uploads"& exceldb))
fileObject.Delete Set fileObject = Nothing Set fso = Nothing ' Deletes exceldb End Function
What is the easiest way to 1) delete a File System Website Solution and 2) rename a File System Website solution?
I noticed when I create the ASP.NET Web Site (via File System location option) that I get one directly with my code (.aspx etc files). but the solution is under the default Visual Studio directory. So I assume if I delete these two directories then my solution is really gone?
Renaming a solution seems to be a bit more tricky - what would be the easiest way to rename the solution and the associated directory with the acutal code (.aspx etc files)?
if I had a form using the input textboxes using username and password. how do I use the .asp language to remove the line from a .txt using the following format:
We have offer a web space to hosting our client website. We offer them to upload asp files to their web space. How can I prevent the client from uploading asp files that will harm our web server.
For example, deleting files in our server using Scripting.FileSystemObject to delete our systemmfiles.
Ok, the following page uploads files to the server and renames them according to the item ID and database table (or update type). It also replaces existing files. There are potentially 5 files for each item ID (see FILE REFERENCE). Code:
I have the setup working close to what I am after. The upload script I am using has been supplied by 'Lewis Moten'.
Basically what I am after is.
A job application contact form. that includes a input="file" element allowing the user to send a CV, to the address related to that job.
So far locally I have the file uploading, the file sent, and then the file deleted all working fine. Althoug this may well work locally I feel I will have problems when I come to trying this live. Mainly due to timings.
Surely the script would need to know when the file has been uploaded completely, also when the file has been sent completely before delete....
I have an Access DB with newsletter preferences in it. What I am trying to do is select small groups to send a custom newsletter out to. So my localhost criteria web page goes to the Access DB and pulls the email addresses that match my current criteria. I then write that list out to a file (newsletterlist.txt). Maybe that is my problem, but I wanted to do that so if my machine crashed while processing, I would know where to recover it. I had looked at arrays and dictionaries but dictionaries aren't good from what I found for hundreds of entries and arrays I can't keep track of..argh.
Anyways, I then wanted to loop through the file (newsletter.txt) find the next email address, with it I can query back to the DB and get preferences and assemble the email and out the custom newsletter goes.
I've seen where MS says deleting a line using the FileSystemObject is not possible, though wanted to see if anyone has found a work around.
Performance isn't that much of an issue for me, as I figured I'd set the thing to running and go to dinner! So anyone have suggestions - even if it means taking the text info to an array, somehow delete one of the addresses and then put it back to a file...anything that can one by one delete the addresses so I know that it all has worked as there would be no email addresses left in the file.
I am trying to delete all the records from one table and insert a few in the same table. When I run the asp it gives me the error message
"Error Type: Microsoft OLE DB Provider for ODBC Drivers (0x80004005) [Microsoft][ODBC Microsoft Access Driver] Could not delete from specified tables."
Before opening the connection to the database, I tried setting the mode to 3 as follows:
Set Conn = Server.CreateObject("ADODB.Connection") conn.Mode= 3
Then I open the connection. But it still gives me the same error.
i would like to be able to delete a record from a database this is the code i have atm but it is not working:
if request.querystring("action") = "delete" then strSQL = "DELETE * FROM DVDDescription WHERE DVDDesc_ID=" & request.querystring("DVDDesc_ID") & ";" objRS.open strSQL,conn,1,2 'objRS.close
I'm getting an error from something that seems too easy to cause trouble. Here's the scenario. User fills out a form. User saves. On submit, an asp script attempts to save the data. it deletes all of existing child records, and then re-inserts new child records.
Heres the chunk of code thats bombing out with a 'Microsoft OLE DB Provider for SQL Server error '80040e31' ':
'delete all children for this Parent record strSQL = "DELETE FROM qcspec_is_tasks WHERE parentID = " & nRecID debugPrint strSQL cn.Execute strSQL
The print statement yeilds the following, before the Execute statement dies:
DELETE FROM qcspec_is_tasks WHERE parentID = 20
If I run the above in query analyzer, it executes instantly.
Incidentally, at this point in time, the table is tiny. Its only 50 rows or so, at the moment.
strsql = "Delete FROM College_List WHERE STDID = (Select ID from Students where StudentID='" & getstdid & "')"
i get this error
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
but i want to delete all the records in the child table that have the ID in the parent table which is students.
During the development, I need to test cookies (ASP and ASP.net).
For the first time I test (First username), it writes the cookies into my computer using the First username, and when I want to test second time, using another user name (Second username), it wont't show up the login page, but instead it automatically let me access the protected page (using the first test username).
Question: I want to delete this cookies! How?
I have searched:
Temporary folder, and can't find it. Document and settings (W2000 Professional), and can't find it as well.
The easiest way to describe my situation is by using the 'email' example. I retrieve my email messages and place a 'delete' checkbox by each message. I select the messages I want to delete and then click the delete button. They magically disappear.
I'm using ASP-->COM-->Stored Proc. I've envisioned creating a recordset to hand to the COM, then for each record fire the stored proc (although I'm unfamiliar with modifying a recordset before a form submit).
I have this code where I can check mark the items I want to delete and hit the submit key and it will delete the records, but the problem is that when I hit submit it opens another window for the same page and I can see that the records are the deleted, but the page where I checked marked the boxes to delete the records is still there and its still showing the records.
I dont want to open another window, I want all this process to happen in the same page and when I click on the delete button it should delete the records and the same page should refresh. Code:
I been working on this code for a long time, code doesn't work and It also doesn't show any error. All I am trying to do is delete record. I click on id number from first page that brings me to this page. Code:
Is it possible after i run my process i delete text files from server. I run a process to read from text files after that i want to delete these text files so that no one again run the process.I am using ASP.
Basically I'm trying to combine an SQL inner join with a delete statement, like:Code:
var cnn = Server.CreateObject('ADODB.Connection'); cnn.Open(Application('cnn')); cnn.Execute('delete * from editors_sections inner join editors on editors_sections.editor_id = editors.editor_id where editor_id='+intEditorId+' and editor.isSectionOne=0 or editor.isSectionTwo=0 or editor.isSectionThree=0'); cnn.Close(); But it gives me the following error:
Incorrect syntax near '*'.
Can this be done, and if so, can anyone see where I'm going wrong (I'm using JScript if that makes any difference?)
can someone help me. I'm writing an onlineshop in asp and for the shopping cart i use an array. If someone wants to delete some articles from the cart, i have to delete them from the array. How i delete only one article (on line) from the array.
I am trying to delete a chosen record out of my Access database using the ID field as the parameter. I can get the script to output the record so I know it has the record, it just won't delete! Code:
I'm simply trying to check if the categoryid is currently being used by any catalogue/product items.
Ok, I've created a mini site content management system and I'm stuck on this function that will ensure data integrity...
I'm trying to check if the categoryid I'm trying to delete has any related 'catalogue' items (products); and if so display a message 'Sorry, there are items currently listed under this category. Move the items before trying to delete'. Basically disallow the delete function if any catalogue items share the categoryid. That's it! Simple... right???