Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Upload File to Access DB

Explorer ,
Aug 25, 2010 Aug 25, 2010

I'm updating an old form that populates data in Access 2007.  We switched to 2007 in order to use the "Attachments" field in Access.  Our users need to be able to attach files to the forms they are submitting.

On the form I utilized the Insert Record Wizard.  I included the field (Attachment) in my recordset.  However, when I click on insert the page does not do anything and refershes itself - no records are written to the database.  However, if I ignore the attachment field, the record gets written to the table correctly.

I've read forums/discussions and I think that a lot of discussion is how to upload a file without the "File Field" in CS4.  I'm trying to utilize as much of what is built in Dreamweaver as possible, as I'm not a VB or ASP programmer.  What's the catch on how to upload the file from the form in CS4?

TOPICS
Server side applications
1.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 25, 2010 Aug 25, 2010

As far as I know, no version of DW server behaviors supports uploading files to the database. And unless you have a compelling reason to do so, you should not store binary files in a database. Store files in the file system and store the file metadata in the database.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 25, 2010 Aug 25, 2010

OK, I'm interested in going that route if I need to.  Do have any further guidance on how to accomplish this?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Aug 25, 2010 Aug 25, 2010

I've only done file upload operations with the aid of extensions.

The file field in DW only will call the file browser in the OS and populate it with the local path to that field. It then requires the inclusion of whatever script you would use to perform the uploading itself. The extensions I've used are Pure ASP upload from DMXZone, and Digital File Pro from Web assist.

the latter is PHP only, but both offer lots of functionality and are worth the price if you plan on using those features.

But for your immediate issue, you should be able to find a rather simple ASP upload script that doesnt require server side code. Also, some web hosts have a file size restriction on their Windows servers - the last time I tried this with Network Solutions the limit was 500k.

As a side thought, have you considered moving away from using Access on the web? Most hosts that iffer Windows servers also offer MSSQL which can be managed easily using Access and an ADP file. Or even going to PHO and MySQL where you're going to find much resources, scripts and tutorials at your disposal. And this is from someone who has worked with classic ASP for 10 years and recently just am switching to PHP and wish I had done it long ago.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 25, 2010 Aug 25, 2010
LATEST

I've been searching for some asp script to include the file to be uploaded during submit on the record into the database.      

We do have a SQL server and a second phase will be to make the migration to it.  The original developer of the system was the only user and used the Access forms to execute their tasks.  Now the application is being opened up to a broader audience and requires the database to be hit from a web form.

Would you be willing to share a script if you have it?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines