Bugfix to SQL query

This commit is contained in:
Rick Falkvinge
2013-10-02 15:38:21 +00:00
parent 78058c1644
commit a85aeffdff
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -75,7 +75,7 @@ namespace Swarmops.Database
DbCommand command =
GetDbCommand(
"SELECT Documents.DocumentId,Documents.ServerFileName,Documents.ClientFileName,Documents.Description,DocumentTypes.Name AS DocumentType,Documents.ForeignId,Documents.FileSize,Documents.UploadedByPersonId,Documents.UploadedDateTime From Documents,DocumentTypes " +
"WHERE Documents.Description = '" + description.Replace ("'", "''") + " AND " +
"WHERE Documents.Description = '" + description.Replace ("'", "''") + "' AND " +
"Documents.UploadedDateTime > '" + DateTime.UtcNow.AddDays(-1).ToString("yyyy-MM-dd HH:mm") + "'", connection);
using (DbDataReader reader = command.ExecuteReader())
+1 -1
View File
@@ -224,7 +224,7 @@ namespace Swarmops.Frontend.Automation
file.InputStream.Position = 0;
file.SaveAs (StorageRoot + fileFolder + Path.DirectorySeparatorChar + fileName);
Document.Create (StorageRoot + fileFolder + Path.DirectorySeparatorChar + fileName, file.FileName, file.ContentLength,
Document.Create (fileFolder + Path.DirectorySeparatorChar + fileName, file.FileName, file.ContentLength,
guid, null, authData.CurrentUser);
statuses.Add (new FilesStatus (fullName, file.ContentLength));