Using Field Type Document

Under Forms/Fields/Field Type and Grids/Fields/Field Type:
I see several options can someone explain how these are used? the purpose of each option? some are obvious however I need to know how these are used and see if they meet my requirement. I see no exaples out there.

Options:

  1. Image (Database)
  2. Image (File Name)
  3. Document (Database)
  4. Document (File Name).

What I am looking for is for a way to store documents somewhere on the server (word etc) and have access to them somehow via a script case “form” or a “grid” application.
Can the documents reside in a Directory on the Server or do they need to be pointed to or stored into a database table… a clue-less sorry.

Thanks.

Re: Using Field Type Document

Database: the file is stored directly in your database, the field type must be blob.
File name: the file name is saved on your database and the file/image is stored in the directory that you configured as your image directory.

Document: The field saves the file and put a link to the end user download.
Image: like the document, but the image is displayed.

Now, you have Document(database) and Document(file name), image(database) and image(file name).

Re: Using Field Type Document

Hi,
I want upload a text file into a Mysql DB and then I want read it and convert in string.
How can I do?

thank’s

Re: Using Field Type Document

you want to store the file directly on the database or upload the file and store de contents showing the contents?

Re: Using Field Type Document

Hi
I want upload and store a text file into DB
This file contain some data that I use to insert in a table

Massimo

Re: Using Field Type Document

Hi,

I’ve done a similar question some time ago.
Let’s see http://www.scriptcase.net/forum_en_us/index.php?topic=2078.0 and let me know if it can help you.
Bye
Giovannino

Re: Using Field Type Document

Hi,
my problem is different. I try to explain.

I Have to import a text file like this
[Pratica]
[Classe]AUTO
[Omologazione]OEWDD02EST181B
[Targa]AK048ER
[Telaio]WDD1690311J664925
[Carrozzeria]AUTO
[Prezzo]10000,00

I want :

  • save the file in a table (tb_files)
  • save any data (es. [classe], [targa],…) in an others table (tb_pratiche)

I’ve created a form and I save the file, but I don’t know how read the data in the file for write the table tb_pratiche.

can You help me?
thank’s

Re: Using Field Type Document

if the files that you are uploading is txt(not binary) … just use field type TEXT and in the scriptcase use Document(database) to store directly in the database.

To read the content … just select field from table where … the field is recovered as a simple field.
if text is not enough, use clob(stores long object as character).

Re: Using Field Type Document

yes, now it’s ok!!!

thank you very much!!!