I am testing one application that handles files (stored in sql server using filestream). It is a Delphi win32 application.
Opening a xls document stored in the db (originally saved with Office 2003) gives an error from Excel 2010 64bit.
Is there some known compatibility issues with Office 2010 64bit with win32 applications?
i am trying to get closer to the problem, but in the meantime I ask to have help.
*Additional notes:
When opening the file Excel gives the following error "Impossible to open the file FILE because of problems in contents"/"Impossible to open the file because some parts are missing or not valid".
Opening a file from machine A with office 2007 opens the file with no problems.
Opening the same file from machine B with office 2010 gives the problem.
Opening again from machine A it gives the problem! In all these steps I am just reading from db, not writing. So why this can happen?*
Extra update: how do I open the documents
These are the steps I use:
1. Select Query to get 'DOCUMENT' varbinary(max)
field for Specific ID_Document.
extract From Db using
TBlobField(sqlQuery.FieldByName('DOCUMENT')).SaveToFile(sDestinationPath + FileUniqueName + .zip')
;Copy File from One Path to Another file using
Windows.CopyFile
Unzip file using
TZipforge
componentSet attribute of unzipped file to readonly using
FileSetReadOnly
function.open document using
ShellExecute(0, 'open', PWideChar(FIleName), '', '', SW_SHOWNORMAL);
As you can see there is nothing that writes back to the db. Once the file is extracted from TBlobField it is even copied to another place before unzipping and opening it.
FINAL NOTE:
Office has been reinstalled and now everything works, the problem of corruption was due to a conflict with an open office installation that asked "do you want to fix the office installation?". Anyway the problem still remains, because I cannot understand what happened. How can I corrupt a file in the DB if I extract in a folder and open it from the folder without psoting anything back to DB?