Re: Open bytea files (images, docs, excel, PDF) stored in Postgresql using a Microsoft Access form - Mailing list pgsql-general

From Vincent Veyron
Subject Re: Open bytea files (images, docs, excel, PDF) stored in Postgresql using a Microsoft Access form
Date
Msg-id 1370608869.2506.33.camel@asus-1001PX.home
Whole thread Raw
In response to Open bytea files (images, docs, excel, PDF) stored in Postgresql using a Microsoft Access form  ("Aitor Gil Martin" <agmartin@getxo.net>)
Responses Re: Open bytea files (images, docs, excel, PDF) stored in Postgresql using a Microsoft Access form  ("Aitor Gil Martin" <agmartin@getxo.net>)
List pgsql-general
Le vendredi 07 juin 2013 à 11:35 +0200, Aitor Gil Martin a écrit :
> Hi,
>
> I,ve got a clients table in PostgreSQL. Each client has different
> documents (more than 7.000 files in total in different extensions JPG,
> XLS,DOC,PDF…) stored in a bytea field in another PostgreSQL Table. My
> intention is to create a form using Microsoft Access (or some other
> software) to be able to manage those files (Add more files, modify
> files or delete files).
>
> What should I do in order Access could understand (open) each file or
> store new files?

I do this from a navigator now, but the general idea is :

use this table structure:

create table (
id_document serial,
content bytea,
extension text)

In your form, display a list of links, one for each file, pointing to a
directory you can write to, with the file's id and extension. So if file
id is 7001, extension is pdf, path is : your/directory/7001.doc

Write the file's data to disk, obviously using the same name for the
file as in the link, once the user clicks on the link, using the
on_click event : file will be served to the user.


--
Salutations, Vincent Veyron
http://marica.fr/site/demonstration
Progiciel de gestion des sinistres assurance et des dossiers contentieux pour le service juridique



pgsql-general by date:

Previous
From: Marc Dahn
Date:
Subject: Full text search, SQL functions, and the planner
Next
From: "Aitor Gil Martin"
Date:
Subject: Re: Open bytea files (images, docs, excel, PDF) stored in Postgresql using a Microsoft Access form