Problem saving a word document using DSOFramer ActiveX control

  • 13 years ago

    Hi every one,

     

    I am developing a windows application which needs word and visio application to be embedded on to a form.  I am using DSOFramer Active-X control to do the above.

     

    My application reads data from the database (a BLOB Field - that contains the word or visio document) and creates a temporary file in the local directory and then opens that file using DSOFramer control. (http://support.microsoft.com/kb/311765)

     

     

    All the manipulations are stored on the same temporary file and update the file contents on to that database (as BLOB).

     

    It works fine most of the time but some times while saving the word document it through an exception - "the target of an invocation"

     

    Inner Exception -System.Runtime.InteropServices.COMException (0x80030021): A lock violation has occurred.

     

    This exception occurs while saving the document.

     

    There is an even provided by DSOFramer control – OnSaveCompleted’ which occurs on save completion.

     

    After the file saved, I am opening the temporary file using IO.FileStream and reading the contents to byte() and updating the database with new binary data(BLOB Field)

     

    I hope this explains wat I am trying to do.

     

    Please could any one tell me where I am going wrong.

     

    Thanks in advance

     

    chirantan

Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.” - Rich Cook