MS Access app conversion to .Net w/ intensive use of OLE Containers

F

Fly Girl

I've been reading a number of postings on .Net that indicate that
there is no OLE Container control for .Net applications.

Has anyone successfully converted a VB6 or MS Access 2000/2002 app
that used OLE Controls to hold links to files? If so how did you get
around the no OLE Control limitation?

I have an Access app to SQL Server that uses an OLE control to let
users link to and view medical records, form letters, emails and fax
images in .pdf, .doc, .tif, and a variety of other file formats.

All I need to do is 1) control the files associated with particular
records (know if they are changed or deleted) and 2) print files via
code.

Can this be done with .Net?
 
R

Russell Jones

You can use OLE controls, but you need to add a reference to the file
containing the control in your project. After referencing the control (which
must be installed and registered on each machine you intend to use it on,
including your development machine, you should be able to use it very much
like you would use it in Access or VB6.
 
B

Ben Coats

What I'd suggest doing is using a ListView control and,
when you open the particular record, add links with icons
into the listview, having the Text property of the
listviewitem set to the full file name, or Medical
Records ID#, or other unique identifier. Then, you can
write code to open the file using the program that
created it, or to open your EMR program and load the
medical record, if it has an API. All in all, it's not
hard, and it's pretty straightforward. You simply have
to write a managed code wrapper for the shell functions
you'll need to call to get the appropriate icon for the
file, and then write a little code to start a process
from the document file you wish to open.

Hope that helps some!
Ben
 
G

Gail Schipper

Thanks for the info!

As long as I can create and directly automate the former OLE Server apps
as objects it looks like I can do most of what I have done before. This
should only mean writing a little more code.

Seems like there may be no way to catch the info provided by the (OLE)
clt_Updated event which would return a code indicating if the OLE object
(file) had changed, been saved, etc. This could induce a lot of overhead
with document saves if I have to save it every time they access the
object instead of just when they save the file.

Thanks for the ideas!
 
G

Gail Schipper

Hmmm, this may be a double post as my attempt to submit this seems to
have gone splat. Sorry if I'm redundant.

Thanks Peter!

However, it seems like the list box control may work best for my needs
since most of the associated files with my records are, in fact, not
office documents but .pdf forms and .tifs off of a fax server. We do
have some Word mail merge letters (this should be fun to translate to
.net) which might benefit from this control.

There is really no need to view the attachments after verifying that the
proper files are associated with each record. Printing them and trying
to catch any changes to them are my main concerns at the moment.

Thanks for the info!
 

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