How do I delete an Attachment?

This forum is now locked, since gold support is no longer offered.

Moderator: SourceGear

Locked
JeffKoski
Posts: 5
Joined: Thu Sep 29, 2005 2:58 pm
Location: Orange, CA

How do I delete an Attachment?

Post by JeffKoski » Wed Oct 19, 2005 2:08 pm

I accidently added the wrong attachment and now need to delete it. Do I have to go into SQL server and manually delete?
Jeff Koski, MCSD, MCSE
Senior Software Engineer
http://www.pdsi-software.com

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Post by lbauer » Wed Oct 19, 2005 3:06 pm

There's no way to delete attachments from Dragnet itself. You can delete rows from the attachments table in the sgdragnet database. Be sure to backup your database anytime you modify the database directly.
Linda Bauer
SourceGear
Technical Support Manager

JeffKoski
Posts: 5
Joined: Thu Sep 29, 2005 2:58 pm
Location: Orange, CA

Post by JeffKoski » Thu Oct 20, 2005 9:01 am

I only have one row in the attachment table which has the name of the doc I want to delete. I can delete this row, but is there any other clean up that has to be done? I do not see where the actual doc was stored. Thanks.
Jeff Koski, MCSD, MCSE
Senior Software Engineer
http://www.pdsi-software.com

jclausius
Posts: 3601
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Post by jclausius » Thu Oct 20, 2005 9:20 am

A better way to do handle this would be through the stored procedure.

Assuming you know your :
a) User's ID (SELECT uid, name FROM sgdragnet.dbo.users)
b) Message / Attachment IDs (SELECT filename, msgid, attid FROM sgdragnet.dbo.attachments )


Call

Code: Select all

EXEC sgdragnet.dbo.spdeleteattachment @uid, @msgid, @attachmentid
Jeff Clausius
SourceGear

Locked