.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Modified By - getting updated without saving file

Posted By:      Posted Date: April 14, 2011    Points: 0   Category :C#



We have observed a strange behaviour on "Modified By" column of a document library.


In our scenario; a file has been uploaded in a document library (versioning enabled). Another person opens that file in view mode and closes the file without saving. In some specific case the "Modified By" and "Modified Date" fields are updated by this person/current date-time.


Surprisingly version history indicates only one version and by name of last person/date-time; while "Created By" field still holds the name of person who uploaded file originally.

View Complete Post

More Related Resource Links

The Free Barcode Creator produces barcode images one at a time, and allows easy saving to a file or

The Free Barcode Creator produces barcode images one at a time, and allows easy saving to a file or pasting into an application. 2D versions are also available:

Does this look correct for saving a file/ new record to a database


So thank you for all your help so far, So I think i got this right,
but would like for you all to look it over to see if there is any
areas I might run into trouble with:

//using asp.net mvc 2
the table (sql server 2005, using entities framework)
table fields
"Pattern_Media_GUID  uniqueid 
"Pattern_GUID  uniqueid
"Media varbinary(max)  
"height int
"Width int
"Media_Type String (50)

the form:
<h2> Add Media to this pattern</h2>
<% Html.EnableClientValidation(); %>
<% Html.BeginForm("AddMedia", "Pattern", new { id= Model.Pattern_Guid} , FormMethod.Post, new {enctype = "multipart/form-data"}); %>
    <%: Html.Label("height") %>
    <%: Html.TextBox("height") %>

    <%: Html.Label("width") %>
    <%: Html.TextBox("width") %>

    <%: Html.Label("Media") %>
    <input type="file" id="Media" name="Media" />
    <input type="submit" name=

VB.NET Saving Excel File

Hi, I am exporting my values in my textboxes to an excel spreadsheet (user clicks "Export" button on form). After it is done, it asks me if i want to overwrite my current excel spreadsheet. Is there a way that I can open a save as dialog box so I can choose what name and where to save it? Thanks   Private Sub ResultsExcelbgw_DoWork(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles ResultsExcelbgw.DoWork Dim Resultsdata As ResultsDataDef = DirectCast(e.Argument, ResultsDataDef) Dim xlApp As Excel.Application Dim xlWorkBook As Excel.Workbook Dim xlWorkSheet As Excel.Worksheet Try xlApp = New Excel.ApplicationClass xlWorkBook = xlApp.Workbooks.Open("C:\program files\Noxious Weeds Report\Reports\nw_budget_Summary.xlsx") xlWorkSheet = xlWorkBook.Worksheets("sheet1") Catch ex As Exception MessageBox.Show("Excel connection error: Please contact your System Administrator.", "Communication Error", MessageBoxButtons.OK, MessageBoxIcon.Error) Exit Sub End Try 'Use message box below to check current value in excel if needed 'MsgBox(xlWorkSheet.Cells(1, 1).value) 'edit the cell with new value Try xlWorkSheet.Cells(1, 1) = Resultsgrpbox.Text xlWorkSheet.Cells(18, 1) = "Report Generated: &quo

reading excel file without saving to disk first

Having an issue.  I need to be able to read an excel file from a file upload control but I can not save the file to disk first, it must be done in memory.string excelConnectionstring = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source="; excelConnectionstring += filePath.Replace("/", "\\"); excelConnectionstring += ";Extended Properties='Excel 8.0;HDR=YES;IMEX=1;'"; OleDbConnection con = new OleDbConnection(excelConnectionstring); OleDbDataAdapter da = new OleDbDataAdapter();Above is my code for reading the data file if it IS saved to disk, but again, I have to be able to do this without saving the file to disk, it must be done in memory.  I have not been able to find any sample code anywhere on how to do this from memory, everything seems to force the file be uploaded, saved to disk, and then read in the connection string, which again I can not do.Any advise would be great, thanks in advance.  I'm really in a bind here.

Saving Image File in a Folder on Sever from Client Machine using Sql Server

  Hi EveryOne... Can anyone help me Saving an Image file in a Server folder from a client machine using Sql server 2005....   

Saving SSIS results to Log or text file using dtexec

Hi, How to save the SSIS package results to log file using dtexec command............please help regaridng this...........   Thanks in advance,

Saving a generated text file

 I have an application that collects data and puts it in a text file.  When the data collection is complete the UI offers the user the opportunity to save or open the text file with a dialog box using this code: Response.Clear(); Response.ClearHeaders(); Response.AppendHeader("Content-Disposition", "attachment; filename=" + outputFilename + ";"); Response.Cache.SetCacheability(HttpCacheability.Private); Response.ContentType = "text/plain"; Response.WriteFile(outputFilePath + outputFilename); Response.End(); Response.Flush(); The problem is this.  The starting interface allows the user to select a large number of data gathering points.  If all are selected the program will run for about 90 minutes.  Sometimes it will present the dialog box, sometimes not.  Sometimes it will present the dialog box, but regardless of whether the user selects save or open, the dialog box simply disappears, and the data text file is neither displayed nor saved to the client system. When fewer data gather points are selected, and the program runs for 15 minutes or less, there is no problem.  The resulting data can be saved or displayed. The actual data text file is initially stored in the temporary path directory on the web server.  On at least one occasion, where the dialog box disappeared, I was able to

Send a csv file by email without saving it first

The following code pulls data from a table writes it to a csv file and then prompts a user to open or save the file. What I need to do is pull the data to the csv file and send it to a predetermined email address, without prompting the user or saving it. How can I do this? Dim MySQL As String = "" MySQL = "SELECT TOP 1 * FROM [tblSurvey] ORDER BY SurveyID DESC" Dim MyConn As New SqlConnection(ConnectStr) Dim cmd As New SqlCommand _ (MySQL, MyConn) 'Set the appropriate ContentType. Dim filename As String = "Data_" & txtName.Text & "_" & System.DateTime.Now & ".txt" cmd.CommandType = CommandType.Text cmd.Connection.Open() Dim myReader As SqlDataReader = _ cmd.ExecuteReader _ (CommandBehavior.CloseConnection) Dim i As Integer Dim sb As New System.Text.StringBuilder For i = 0 To myReader.FieldCount - 1 If i < (myReader.FieldCount - 1) Then sb.Append(myReader.GetName(i) & Chr(9)) Else sb.Append(myReader.GetName(i) & vbCrLf) End If Next While myReader.Read() For i = 0 To myReader.FieldC

How to show a message box on an invalid filename entered while saving a file using save file dialog

Hi all i have written a code to display a message box if invalid characters are entered while saving the file but my message box is not displaying. Actually i will have a save file dialog option to save a file if the filename starts or consists of the following    \\/:*?<>|"  I would like to display a message box as invalid or illegalcharacters in file My code is as follows    Stream myStream;                          SaveFileDialog saveFileDialog1 = new SaveFileDialog();                            saveFileDialog1.InitialDirectory = @"C:\";                          saveFileDialog1.DefaultExt = "txt";                          saveFileDialog1.Filter = "(*.txt)|*.txt";                          saveFileDialog1.FilterIndex = 2;                          saveFileDialog1.RestoreDirectory = true;                            if (saveFileDialog1.ShowDialog() == DialogR

Windows 7, Office 2007, and WSS 3.0: Losing file path when saving to Document Library.

A client of ours recently purchased 5 desktops with Windows 7 and Office 2007.  They use Sharepoint to share all documents for their company. The computers that have Windows XP on them can browse the Sharepoint site, open documents (read only or edit), and chose to Save or Save As.  A new window pops open with their current file path of the Sharepoint Document Library so they can save the file in the same folder they opened it from.  I have tested this with Office 2003 and 2007 (Word and Excel) on XP and it always works. The 5 new desktops running Windows 7 cannot do this.  When a user opens a document by browsing to it from Internet Explorer and chooses to Save or Save As, they are kicked back to their last successful save point (usually My Documents or Desktop). The current work around is mapping a drive to the root Document Library directory and having them traverse through the folders to save it back in the original location. I've tried changing the Check Out save settings in Word 2007 and Excel 2007 to edit directly on the server, but I run into the same problem.  I've also made sure that IE sees the site as a Local Intranet site and Protected Mode is off. Any help would be appreciated.  Thanks in advance.

saving a text file in ms access data base

i have to read a text file in a text box then have to save it into ms access data base in column format how could i do this....

getting and saving (uploading) the file in FileUpload component


Hello all,

I have a question about saving an image file with it's thumbnail in vb.net.

I used the following code :

            If resim.PostedFile.ContentLength > 100 And resim.PostedFile.ContentLength < 10000000 And resim.PostedFile.ContentType.IndexOf("application") = -1 Then
                resim.SaveAs(Server.MapPath("firmadosyalari/a" + Session("firma").ToString + "/") + resim.FileName.ToString)
                If tf.bunuekle(" INSERT INTO firmaurunlerim " + _

The file 'document name' has been modified by user name on 'date'



After modifing the document, if the user edit the document properties and save, it shows error like,

The file 'filename' has been modified by 'user name' on 28 Sep 2010 17:21:04 +0530 .

what is this means? how to resolve this, Please guide me. thanks in advance.


SSIS: Error in the package when the data in the flat file source is modified


Hi All,

I have a package which loads data from a flat file source to an OLEDB destination, which is executed successfully and data is loaded perfectly.

But later when the data in the flat file source is modified i.e. if an extra column gets added to the text file, the package is throwing an error because it is unable to detect the extra added column.

How can i avoid this error??? I need my package to execute successfully ignoring the changes(added columns) happened in the flat file source.

Please provide me wth your suggestions and solutions....

Thanks in Advance!!

BIDS - The file has been modified outside of the source editor


Hi all,

Lately whenever I make a change to a package in my solution - I receive a message: "The file has been modified outside of the source editor. Do you want to reload it?"

Has anyone else come across this before? How do you fix?

Thanks, Clay


Uploading .pdf files with FIle Upload control and then saving to database


Hi everyone!

I'd like to allow users to upload a .pdf file via the file upload control (if that's the best method), save the file to the db and then retrieve it so they can click on a link and open the .pdf they've uploaded.

I've been looking for a tutorial on how to do this but keep running into methods of saving the file directly on the server in a directory, not in SQL server  (using Linq and VB by the way)

Can someone please point me in the right direction on how to do this?   Thanks!

Error when saving file from Word: This file cannot be saved because some properties are missing or


I am receiving an error when trying to save a file from Word into SharePoint: "This file cannot be saved because some properties are missing or invalid"

I have got two different Content Types for this Document Library: "Policies" and "Procedures". Both documents have got exactly the same required fields, all required fields are displayed in the Document Information Panel. If I try to save a "Policy" the saving process works fine, if I try to save a "Procedure" I get the above error.

It's as if the Procedure had an additional required field, but I cannot figure out where that would come from? If I go to manage the Content Types and check the list of fields, I can clearly see which fields are required and which aren't.

Is there something I am missing? Or could one Content Type be corrupt? If so, how do I fix it without messing up all the files that have already been posted using this Content Type?

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend