Documents in Database

Q

Q

Hello you all,

I want to store all kind of files (pdf, doc, xls, txt) in a database. This
is no problem.

The real problem is opening the files from within a .Net application.
I tried several ways to do it:
1. Creating an object of e.g. word to open a document.
2. Taking care of the problem through processes. --> create a process and
run an instance of word...

Both these solutions have the same problems. If word is already open when
you create the object (or the process) and you close
it afterwards, the documents that were already open are closed also (and
changes are lost)

Is there another way of handling files in .Net.

Regards,

Q
 
P

Phill. W

Q said:
I want to store all kind of files (pdf, doc, xls, txt) in a database.
This is no problem.

I find it is often /easier/ to work with such files when they are safely
out in the file system!
The real problem is opening the files from within a .Net application.
I tried several ways to do it:
1. Creating an object of e.g. word to open a document.
2. Taking care of the problem through processes. --> create a process
and run an instance of word...

3. Get the file out of the database, into the file system, and use
Process.Start to launch the document /itself/, thereby invoking the user's
default application for that type of document.
these solutions have the same problems. If word is already open
when you create the object (or the process) and you close
it afterwards, the documents that were already open are closed also
(and changes are lost)

Your problem is not in opening the document, but in knowing just
/when/ the user has finished mucking about with it.
Is your application waiting for the Start'ed (editor) process to end?
That would /help/, although it might be waiting a very long time before
the user closed down something like Word.

Take a step back from the technical nitty-gritty for a moment
- What is it you're hoping to achieve with this?

Regards,
Phill W.
 
Q

Q

Hey Phill,

I our office, we have to deal with lots of documents that have to be
distributed among different users.
I would like to store all my files in a database so I can check who read the
files and who didn't.
I also want to give some users the possibility to read some files, while
other users can't read them.
It would be some kind of distribution center of documents....

Regards,

Q
 
P

Phill. W

Q said:
I our office, we have to deal with lots of documents that have to be
distributed among different users.
I would like to store all my files in a database so I can check who
read the files and who didn't.
I also want to give some users the possibility to read some files, while
other users can't read them.

Fair enough.

I would suggest, though, that "reading" a file and "making changes"
to a file are /very/ different things and probably ought to be handled
by /different/ mechanisms. It sounds like what've you've already
got will handle the delivery of documents nicely, but I think you should
be looking at some other process to take a user-revised (or "new")
document and "submitting" it back into the system.

Regards,
Phill W.
 
R

RSH

You can still use the filesystem to store documents and simply store the
documents metadata in the database. So all of your security etc can be
managed as you would like, but you have the benefits of storing the docs in
the filesystem...this is how most document management systems do it. You
can even secure the directory so it is in accesible to anyone without the
appropriate permissions. this way you dont have to worry about the problems
you are encountering.

Simply store a pointer to the file opposed to storing the file itself in the
database.
 
Q

Q

Hey there,

this seems like a good idea, but is there a simple way to search the
documents this way. E.g. someone wants to
view all the files that have some product in the text. Can this be done from
within VB.net in the way of working
you are suggesting?

Thanks for the advice in advance!!

Regards,

Q
 

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