sqltransfer

beasscript-logo-small

Transfer of table-content via PSR-file. Part of the Userobjects tools.

 

You can use PSR-files not only for forms but also as a storage of table-content.  

 

This function allows you the creation and loading of PSR-containers.

 

 

tools=sqltransfer=save=<file>=<sqlquery>

Saves the result of the sql-query to the PSR-file.

tools=sqltransfer=read=<table>=<file>

Saves the content of the PSR-file to the specified table. The target-table can have more columns but in no way not less columns.

help-achtung

The table content is deleted before saving the PSR!

tools=sqltransfer=newread=<table>=<file>=<where-clause>

First all entries of the table which match the WHERE-clause are deleted, then the content of the PSR-file is imported. Be careful with Primary-key constraints!

 

Example Save

input=Filename=cfile=beas_document_default.psr     =cancel
if=<cfile>==cancel
tools=sqltransfer=save=projekt\<cfile>=select * from beas_belege

 

Example Load

tools=getfile=Filename=psr
if=<filename>==cancel
question=Attention! Current Data Delete!==cancel
tools=sqltransfer=read=beas_sys_spr_texte=<filename>=typ='beleg'
retrieve=retrieve