OBS/Adminhilfe/Pax Script Beispiel
Zur Navigation springen
Zur Suche springen
SQL-Export-Script
//-----------------------------------------------------------------------------
// Unit Name: SqlExporter
// Author: Jr
// Date: 04-Aug-2011
// Purpose:
// History:
//
// Folgende implementiere Funktionen stehen dem SQL-Exporter zur Verfügung
//
// function GetSqlExportStr(oForm: TxForm): String;
// procedure SetSQlExportStr(oForm: TxForm; cSql: String);
// function RunSQlExporter(oForm: TxForm; lAuto:Boolean): Boolean;
// function SaveDataSQlExporter(oForm: TxForm; cFileName: String; nWahl: Integer; lAuto: Boolean): Boolean;
// function ShowDataSQlExporter(oForm: TxForm): Boolean;
//
//-----------------------------------------------------------------------------
var oForm : TForm;
oParent : TxForm;
lCheck : Boolean;
Const CSV = 2;
EXCEL = 3;
HTML = 4; //Nur im Grid Möglich
//-----------------------------------------------------------------------------
// Procedure: Not available
// Author: Jr
// Date: 04-Aug-2011
// Arguments: Not available
// Result: Not available
//-----------------------------------------------------------------------------
procedure StartProc(Sender: TxForm; cParameter:String);
var cSQL : String;
begin
oParent := Sender;
cSQL := 'SELECT * FROM WARENGR'+
' WHERE wg_nr >= "001" AND wg_nr <= "100"'+
' ORDER BY wg_nr';
SetSqlExportStr(oParent,cSQL);
ShowDataSQlExporter(oParent);
end;
//-----------------------------------------------------------------------------