Solved

.ADP ACCESS PROJECT - Is it possible to create a form with an attachment button?

Posted on 2013-11-16
6
503 Views
Last Modified: 2014-01-22
I would like on my form to have an attachment button that can store .tif / .pdf / .jpg / .gif  in the SQL DB

Is this possible in an access database connected to SQL SERVER 2008 running as .ADP access project?
0
Comment
Question by:Dale Massicotte
  • 3
  • 2
6 Comments
 
LVL 24

Expert Comment

by:Bitsqueezer
ID: 39654286
Hi,

you cannot use the native attachment functions of Access as this is a ACE-only feature. But you can of course use the varbinary(MAX) datatype of SQL Server to store any kind of binary file into a column of a table in SQL Server.
I recommend to use an own table which holds such attachments and not add a varbinary(MAX) column to your normal tables because that will slow down the performance a lot. Using an own table has the advantage that you need the attachments only when the user wants to download one.
If possible you should consider to better use a separated fileserver to store the files and to present a link to the file in the database, otherwise your database size will grow very fast.

Cheers,

Christian
0
 
LVL 38

Expert Comment

by:Jim P.
ID: 39654470
I agree with Christian; you do NOT want to store binary objects inside a DB. Store pointers to them on disk.

Additionally the ADP support effectively ended with Access 2003, even though they will still work with newer versions of Access.
0
 
LVL 24

Expert Comment

by:Bitsqueezer
ID: 39654504
Hi jimpmen,

to be exact: In A2013 ADPs were removed from Access. But it is still possible to work with ADPs normally up to A2010 with SQL Server up to 2008. I personally also prefer to use ADPs instead of ACCDBs because of the JET/ACE in between which makes it really harder to work with SQL Server.
To avoid problems with updating frontends I use a terminal server which holds the A2010 runtime frontends so the user can install on his machine whatever he likes and the database frontend will never have a problem unless the database server will not be upgraded to a newer version.

Cheers,

Christian
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 38

Assisted Solution

by:Jim P.
Jim P. earned 200 total points
ID: 39654544
Christian,

I meant that support went away in the sense MS never created an AccDP standard that is like the mdb to AccDB change.

I always shied away from ADPs because of all the networking issues. The companies I have worked for have always had segmented networks that made it harder to get good connectivity from workstations to the SQL Server(s).

Another difference is that most of my stuff is ETL tasks, not OLTP.

So if the database is designed correctly it is easy to put data into a DB with DAO or ADO or extract to an import standard and then get it imported into another DB.

Regardless, to the asker's question. The storage of a binary data in the DB is never suggested. The only way I would support it is something like the logo.jpg for a report or a single form.pdf to be sent with an e-mail. Beyond that it should never really be contemplated.
0
 

Author Comment

by:Dale Massicotte
ID: 39687264
jimpen & Bitsqueezer

do you have any code samples of how I might be able to use a pointer (saving to a specific network share folder) via CMD BUTTON.

For example if there  is no file stored the CMD button would prompt user to save file and would actually save the pointer.

If the pointer was stored then the CMD button would retrieve the image file via the pointer that was stored.

Our customers on-line would then be able to retrieve the document via .aspx page
0
 
LVL 24

Accepted Solution

by:
Bitsqueezer earned 300 total points
ID: 39687395
Hi,

Access can store and present a URL as hyperlink in a normal text field. That's all you need to do and then present this URL to the online users, if they click it it will download the file from this URL (the user must of course have access to it).

No code needed for this functionality.

Cheers,

Christian
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

912 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now