diff OrthancServer/DatabaseWrapper.cpp @ 701:f9052558eada

fix attachment
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 10 Feb 2014 14:30:56 +0100
parents 2929e17f8447
children 696dbb4fd390
line wrap: on
line diff
--- a/OrthancServer/DatabaseWrapper.cpp	Fri Feb 07 21:34:09 2014 +0100
+++ b/OrthancServer/DatabaseWrapper.cpp	Mon Feb 10 14:30:56 2014 +0100
@@ -463,7 +463,7 @@
   void DatabaseWrapper::DeleteAttachment(int64_t id,
                                          FileContentType attachment)
   {
-    SQLite::Statement s(db_, SQLITE_FROM_HERE, "DELETE FROM Resources WHERE internalId=?");
+    SQLite::Statement s(db_, SQLITE_FROM_HERE, "DELETE FROM AttachedFiles WHERE id=? AND fileType=?");
     s.BindInt64(0, id);
     s.BindInt(1, attachment);
     s.Run();