Bound OLE in .Net?

S

Skip Borland

I understand that in .Net, there is no such animal as the "bound OLE" frame
available in Access. Unfortunately, as we migrate off of an old (97 -
yikes!) application, combine it with functionality from an old (VS390 -
double yikes) mainframe based processing system into our brand spankin' new
Winforms C# app, this embedded and bound OLE is something I'd really like to
replicate. We store word docs as OLE objects in MS SQL server, retrieve
templates form a source set, programmatically spin through the docs doing
bookmarked inserts and then save the resultant files off to a data table.
For our purposes, it works fantastically, but there is no obvious way to
achieve the same thing via .Net Winforms.

I've done some research involving using the Web Browser, directly
controlling Word, but there is still some functionality that using a Bound
OLE container provides me that I cannot seem to find. Namely, the ability to
bring a document up, but keep it read-only and the ability to pull docs from
a database to be opened by .Net. This is all probably doable, but I'm still
pretty new to this environment (many, many years coding in Visual Basic
3.0-6.0).

Can anyone point me in the right direction here?

Thanks in advance...Skip
 
P

Paul Clement

¤ I understand that in .Net, there is no such animal as the "bound OLE" frame
¤ available in Access. Unfortunately, as we migrate off of an old (97 -
¤ yikes!) application, combine it with functionality from an old (VS390 -
¤ double yikes) mainframe based processing system into our brand spankin' new
¤ Winforms C# app, this embedded and bound OLE is something I'd really like to
¤ replicate. We store word docs as OLE objects in MS SQL server, retrieve
¤ templates form a source set, programmatically spin through the docs doing
¤ bookmarked inserts and then save the resultant files off to a data table.
¤ For our purposes, it works fantastically, but there is no obvious way to
¤ achieve the same thing via .Net Winforms.
¤
¤ I've done some research involving using the Web Browser, directly
¤ controlling Word, but there is still some functionality that using a Bound
¤ OLE container provides me that I cannot seem to find. Namely, the ability to
¤ bring a document up, but keep it read-only and the ability to pull docs from
¤ a database to be opened by .Net. This is all probably doable, but I'm still
¤ pretty new to this environment (many, many years coding in Visual Basic
¤ 3.0-6.0).
¤
¤ Can anyone point me in the right direction here?

I wish I had a good suggestion but unfortunately, as you have found, there is no support in .NET for
databinding with OLE stored information.

Your best bet would be to write a utility which retrieves each OLE document from the database and
writes it as a file to the file system. From there you can either use the file system instead of
storing the document in the database (just store the path to the file), or, store the document as a
BLOB in the database in it's native format instead of OLE.


Paul ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top