Board index » delphi » Save fields of a database in a word document

Save fields of a database in a word document

Hello!

Could you tell me how can I save a document (DOC or RTF) in a Oracle's
database and how can I write a field of the database in the same
document.

Thanks for any tip.

bye.

 

Re:Save fields of a database in a word document


On Tue, 02 Jun 1998 11:58:27 +0100, Cristina Chuva

Quote
<c...@student.dei.uc.pt> wrote:
>Hello!

>Could you tell me how can I save a document (DOC or RTF) in a Oracle's
>database and how can I write a field of the database in the same
>document.

>Thanks for any tip.

>bye.

The following SQL will give you a list of the columns of a table in
Oracle:

SELECT
COLUMN_NAME,
DECODE(DATA_TYPE,
'VARCHAR2', ('VARCHAR2' || ' (' || TO_CHAR(DATA_LENGTH)) || ')',
'NUMBER'  , (DATA_TYPE || ' (' || TO_CHAR(DATA_PRECISION) || ', ' ||
            TO_CHAR(DATA_SCALE) || ')'),
'DATE',   'DATE',
'CHAR'  , ('CHAR' || ' (' || TO_CHAR(DATA_LENGTH)) || ')') DATA_TYPE,

DECODE(NULLABLE,
'N', ('NOT NULL'),
'Y', ('NULL')) NULLABILITY
FROM
 ALL_TAB_COLUMNS
WHERE
TABLE_NAME = :TABLE_NAME

I suggest you go through the OLE Automation Demo Program that goes
with Delphi (in Demos\OleAuto\AutoCtrl). Or maybe read Charlie
Calvert's excellent article about OLE Automation in Inprise's website.

Hope this helps. =)

Mio-Nino P. Marquez

Other Threads