472,127 Members | 1,751 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,127 software developers and data experts.

file attachment in vb 6 and access 2000

Hi

This is my second try... any takers?

I have an application that is up and running. Everything is working
perfectly. The application is written in VB 6 SP5 using Access 2000 to
store the data.

The users would now like to attach files (Word, Excel, etc) to the
records. I have no idea how to go about this :o( I am a Lotus Notes
programmer and in Notes I would have created a RichText field and they
could load and edit their attachment in it. How do I do this in VB?

I have tried to add a RichTextBox. When I drag and drop documents into
the RTB all that happens is I get a link to the origional document.
What I want is for the file to get copied into the RichTextBox. When
the user drags it out it gets deleted. When they double-click it gets
edited. Surely there is a control that has these basic functions?

Any help would be appreciated - just a pointer in the right direction
would be great ;o)

Thanx in advance
Ursus
Jul 17 '05 #1
7 5583
[posted and mailed]

ur*************@hotmail.com (ursus) wrote in
news:5b**************************@posting.google.c om:
Hi

This is my second try... any takers?

I have an application that is up and running. Everything is
working perfectly. The application is written in VB 6 SP5
using Access 2000 to store the data.

The users would now like to attach files (Word, Excel, etc)
to the records. I have no idea how to go about this :o( I
am a Lotus Notes programmer and in Notes I would have
created a RichText field and they could load and edit their
attachment in it. How do I do this in VB?

I have tried to add a RichTextBox. When I drag and drop
documents into the RTB all that happens is I get a link to
the origional document. What I want is for the file to get
copied into the RichTextBox. When the user drags it out it
gets deleted. When they double-click it gets edited. Surely
there is a control that has these basic functions?

Any help would be appreciated - just a pointer in the right
direction would be great ;o)

Thanx in advance
Ursus

Why not simply carry the files' path as a string variable on
your Access DB. That way, when you double click the path name
you can read your file into the RTB.
--
Robert L. Berman
Database consultant
Vulcan Software Services

Jul 17 '05 #2
Hi Robert,

thank you for your answer but we want to keep the file in the database
and not in the file system.

Basically what we want is a file repository! The documents are created
externally and the just stored in the Access DB.

Any other ideas?

Ursus


Robert Berman <No***********@earthlink.net> wrote in message news:<EP*******************@newsread2.news.atl.ear thlink.net>...
[posted and mailed]

ur*************@hotmail.com (ursus) wrote in
news:5b**************************@posting.google.c om:
Hi

This is my second try... any takers?

I have an application that is up and running. Everything is
working perfectly. The application is written in VB 6 SP5
using Access 2000 to store the data.

The users would now like to attach files (Word, Excel, etc)
to the records. I have no idea how to go about this :o( I
am a Lotus Notes programmer and in Notes I would have
created a RichText field and they could load and edit their
attachment in it. How do I do this in VB?

I have tried to add a RichTextBox. When I drag and drop
documents into the RTB all that happens is I get a link to
the origional document. What I want is for the file to get
copied into the RichTextBox. When the user drags it out it
gets deleted. When they double-click it gets edited. Surely
there is a control that has these basic functions?

Any help would be appreciated - just a pointer in the right
direction would be great ;o)

Thanx in advance
Ursus

Why not simply carry the files' path as a string variable on
your Access DB. That way, when you double click the path name
you can read your file into the RTB.

Jul 17 '05 #3
ur*************@hotmail.com (ursus) wrote in
news:5b**************************@posting.google.c om:
Hi Robert,

thank you for your answer but we want to keep the file in
the database and not in the file system.

Basically what we want is a file repository! The documents
are created externally and the just stored in the Access
DB.

Any other ideas?

Ursus


Robert Berman <No***********@earthlink.net> wrote in
message
news:<EP*******************@newsread2.news.atl.ear thlink.net
...
[posted and mailed]

ur*************@hotmail.com (ursus) wrote in
news:5b**************************@posting.google.c om:
> Hi
>
> This is my second try... any takers?
>
> I have an application that is up and running. Everything
> is working perfectly. The application is written in VB 6
> SP5 using Access 2000 to store the data.
>
> The users would now like to attach files (Word, Excel,
> etc) to the records. I have no idea how to go about this
> :o( I am a Lotus Notes programmer and in Notes I would
> have created a RichText field and they could load and
> edit their attachment in it. How do I do this in VB?
>
> I have tried to add a RichTextBox. When I drag and drop
> documents into the RTB all that happens is I get a link
> to the origional document. What I want is for the file
> to get copied into the RichTextBox. When the user drags
> it out it gets deleted. When they double-click it gets
> edited. Surely there is a control that has these basic
> functions?
>
> Any help would be appreciated - just a pointer in the
> right direction would be great ;o)
>
> Thanx in advance
> Ursus
>

Why not simply carry the files' path as a string variable
on your Access DB. That way, when you double click the
path name you can read your file into the RTB.


Ursus,

Check out APPENDCHUNK and GETCHUNK. I would think 1.2GB would
be sufficient to hold what you need. Look in VB HELP rather
than the ACCESS help file.

--
Robert L. Berman
Database consultant
Vulcan Software Services

Jul 17 '05 #4
ur*************@hotmail.com (ursus) wrote in message news:<5b**************************@posting.google. com>...
Hi Robert,

thank you for your answer but we want to keep the file in the database
and not in the file system.

Basically what we want is a file repository! The documents are created
externally and the just stored in the Access DB.

Any other ideas?

Ursus

The problem with storing the files inside the DB is that your DB is
going to get very big pretty fast. When it goes bang, you risk losing
all your files. You might want to read Larry Linson's FAQ on storing
image files, as this is similar in a some ways:
1. you want to be able to manipulate the files/search for them
2. you want to view them from your DB.
Jul 17 '05 #5
ur*************@hotmail.com (ursus) wrote in message news:<5b**************************@posting.google. com>...
Hi Robert,

thank you for your answer but we want to keep the file in the database
and not in the file system.

Basically what we want is a file repository! The documents are created
externally and the just stored in the Access DB.

Any other ideas?

Ursus

The problem with storing the files inside the DB is that your DB is
going to get very big pretty fast. When it goes bang, you risk losing
all your files. You might want to read Larry Linson's FAQ on storing
image files, as this is similar in a some ways:
1. you want to be able to manipulate the files/search for them
2. you want to view them from your DB.
Jul 17 '05 #6
The sample databases illustrating three approaches for handling images in
Access are at http://accdevel.tripod.com. Similar approaches might be used
to handle other types of file, except that a Bound OLE frame is likely to be
required for some types of document. You can't, of course, display just any
document in an Image control -- but the _storage_ techniques apply.

Larry Linson
Microsoft Access MVP

"Pieter Linden" <pi********@hotmail.com> wrote in message
news:bf**************************@posting.google.c om...
ur*************@hotmail.com (ursus) wrote in message

news:<5b**************************@posting.google. com>...
Hi Robert,

thank you for your answer but we want to keep the file in the database
and not in the file system.

Basically what we want is a file repository! The documents are created
externally and the just stored in the Access DB.

Any other ideas?

Ursus

The problem with storing the files inside the DB is that your DB is
going to get very big pretty fast. When it goes bang, you risk losing
all your files. You might want to read Larry Linson's FAQ on storing
image files, as this is similar in a some ways:
1. you want to be able to manipulate the files/search for them
2. you want to view them from your DB.

Jul 17 '05 #7
ur*************@hotmail.com (ursus) wrote in message news:<5b**************************@posting.google. com>...
Hi Robert,

thank you for your answer but we want to keep the file in the database
and not in the file system.

Basically what we want is a file repository! The documents are created
externally and the just stored in the Access DB.

Any other ideas?

Ursus


Ursus,
I agree with Robert. You could do what you're proposing, I guess, if
you use SQL Server. I don't think Access would be terribly stable for
that. Once it gets big, performance would probably not be very
pretty... What happens if you database crashes?
Jul 17 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by bill mahoney | last post: by
5 posts views Thread by Daniel Corbett | last post: by
7 posts views Thread by =?Utf-8?B?QU9UWCBTYW4gQW50b25pbw==?= | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.