Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

delete record and attach files

Status
Not open for further replies.

discusmania

IS-IT--Management
Oct 24, 2000
158
AP
dear guys....

e.g i have records in my oracle db. for each record there is an attach file. what i want is when the prog. delete the record in the database, the attach file will also be deleted. the fields in my db is action and attach. the attach field store the path to the attach file which is stored somewhere else in the same server.

Please help....
Regards,
Nor
 
You can delete files on your server with the FileSystemObject. Since you have the path stored in your DB, it's quite easy :) :

<%
dim fso
set fso=CreateObject(&quot;Scripting.FileSystemObject&quot;)
MyPath=rs(&quot;attach&quot;)
fso.DeleteFile(MyPath)
set fso=nothing
%>

Of course I assume you already have a recordset (rs) with the path in it. Hope this helps, good luck man!





<webguru>iqof188</webguru>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top