Consultor Eletrônico



Kbase P103503: How to dump data from the database from within your application
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   12/13/2010
Status: Verified

GOAL:

How to dump data from the database from within your application

GOAL:

Can my application dump data by using the dump data procedures?

FIX:

The procedure prodict/dump_d.p can be run to dump data from the database without using the Data Dictionary or Data Admin dump data utility. This procedure takes 3 INPUT parameters: the file name(s) for the tables to be dumped, the name of the directory where to put the .d?s, and the code page. The format for the parameters is as follows:
File Name: "ALL" or "<file-name> [,<filename>] ..."
Directory: Name of the directory to dump to
Code Page: ?, "", "<code-page>"

Code-page - support:
code-page = ? :cpstream = UNDEFINED*
code-page = "" : cpstream = (SESSION:STREAM)
code-page = "<code-page>" : cpstream will either be SESSION:STREAM or
UNDEFINED*

*Undefined code page is a special code page which tells Progress not to do any conversion when reading or writing data. As long as there are only ASCII characters this is not a problem but if there are any non-ASCII characters, you run the risk of corrupting them.

Syntax Examples:
Dump all tables:
RUN prodict/dump_d.p (INPUT ?ALL?,
INPUT ?c:/data/?,
INPUT ?).

Dump two tables
RUN prodict/dump_d.p (INPUT ?customer,order?,
INPUT ?c:/data/?,
INPUT ?ibm850?).