2014-06-19 7:10 GMT+01:00 Martin Schreiber <[email protected]>:

> Am 19.06.2014 07:55, schrieb Med Hamza:
> > Here is a simple test
> >
> Please additionally send the *.mfm file(s) and the database creation
> script or DB-file.
>
> Thanks, Martin
>
>
> ------------------------------------------------------------------------------
> HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
> Find What Matters Most in Your Big Data with HPCC Systems
> Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
> Leverages Graph Analysis for Fast Processing & Easy Data Exploration
> http://p.sf.net/sfu/hpccsystems
> _______________________________________________
> mseide-msegui-talk mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
>
program data;
{$ifdef FPC}{$mode objfpc}{$h+}{$endif}
{$ifdef FPC}
 {$ifdef mswindows}{$apptype gui}{$endif}
{$endif}
uses
 {$ifdef FPC}{$ifdef unix}cthreads,{$endif}{$endif} 
 msegui,main;
begin
 application.createform(tmainfo,mainfo);
 application.run;
end.

Attachment: data.prj
Description: Binary data


Attachment: main.mfm
Description: Binary data

unit main;
{$ifdef FPC}{$mode objfpc}{$h+}{$endif}
interface
uses
 msetypes,mseglob,mseguiglob,mseguiintf,mseapplication,msestat,msemenus,msegui,
 msegraphics,msegraphutils,mseevent,mseclasses,msewidgets,mseforms,msedatabase,
 mseibconnection,sysutils,mdb,msebufdataset,msedb,mseifiglob,msesqldb,msqldb,
 msedispwidgets,mserichstring,msestrings,msedataedits,msedbedit,mseedit,
 msegraphedits,msegrids,mseificomp,mseificompglob,mselookupbuffer,msescrollbar;

type
 tmainfo = class(tmainform)
   tran: tmsesqltransaction;
   ibc: tmseibconnection;
   msemaster: tmsesqlquery;
   ds01: tmsedatasource;
   ds02: tmsedatasource;
   msedest: tmsesqlquery;
   tfieldparamlink1: tfieldparamlink;
   tdbstringgrid1: tdbstringgrid;
   tdbstringgrid2: tdbstringgrid;
   
   tdbnavigator1: tdbnavigator;
   tdbnavigator2: tdbnavigator;
 end;
var
 mainfo: tmainfo;
implementation
uses
 main_mfm;

end.
unit main_mfm;
{$ifdef FPC}{$mode objfpc}{$h+}{$endif}

interface

implementation
uses
 mseclasses,main;

const
 objdata: record size: integer; data: array[0..3791] of byte end =
      (size: 3792; data: (
  84,80,70,48,7,116,109,97,105,110,102,111,6,109,97,105,110,102,111,8,
  98,111,117,110,100,115,95,120,2,100,8,98,111,117,110,100,115,95,121,3,
  150,0,9,98,111,117,110,100,115,95,99,120,3,253,1,9,98,111,117,110,
  100,115,95,99,121,3,51,1,16,99,111,110,116,97,105,110,101,114,46,98,
  111,117,110,100,115,1,2,0,2,0,3,253,1,3,51,1,0,15,109,111,
  100,117,108,101,99,108,97,115,115,110,97,109,101,6,9,116,109,97,105,110,
  102,111,114,109,0,13,116,100,98,115,116,114,105,110,103,103,114,105,100,14,
  116,100,98,115,116,114,105,110,103,103,114,105,100,49,21,102,114,97,109,101,
  46,115,98,118,101,114,116,46,112,97,103,101,115,105,122,101,5,36,208,128,
  43,214,128,43,214,247,63,8,98,111,117,110,100,115,95,120,2,0,8,98,
  111,117,110,100,115,95,121,2,0,9,98,111,117,110,100,115,95,99,120,3,
  234,0,9,98,111,117,110,100,115,95,99,121,2,98,7,111,112,116,105,111,
  110,115,11,15,100,115,103,111,95,97,117,116,111,102,105,101,108,100,115,0,
  14,100,97,116,97,99,111,108,115,46,99,111,117,110,116,2,3,14,100,97,
  116,97,99,111,108,115,46,105,116,101,109,115,14,1,5,119,105,100,116,104,
  2,80,9,100,97,116,97,102,105,101,108,100,6,3,67,76,69,9,116,101,
  120,116,102,108,97,103,115,11,8,116,102,95,114,105,103,104,116,12,116,102,
  95,121,99,101,110,116,101,114,101,100,11,116,102,95,110,111,115,101,108,101,
  99,116,0,0,1,5,119,105,100,116,104,2,16,9,100,97,116,97,102,105,
  101,108,100,6,4,67,79,68,69,0,1,5,119,105,100,116,104,3,160,0,
  9,100,97,116,97,102,105,101,108,100,6,3,76,73,66,0,0,19,100,97,
  116,97,108,105,110,107,46,100,97,116,97,115,111,117,114,99,101,7,4,100,
  115,48,49,13,102,105,120,99,111,108,115,46,99,111,117,110,116,2,1,13,
  102,105,120,99,111,108,115,46,105,116,101,109,115,14,1,5,119,105,100,116,
  104,2,15,0,0,13,102,105,120,114,111,119,115,46,99,111,117,110,116,2,
  1,13,102,105,120,114,111,119,115,46,105,116,101,109,115,14,1,6,104,101,
  105,103,104,116,2,16,14,99,97,112,116,105,111,110,115,46,99,111,117,110,
  116,2,3,14,99,97,112,116,105,111,110,115,46,105,116,101,109,115,14,1,
  7,99,97,112,116,105,111,110,6,3,67,76,69,0,1,7,99,97,112,116,
  105,111,110,6,4,67,79,68,69,0,1,7,99,97,112,116,105,111,110,6,
  3,76,73,66,0,0,0,0,13,100,97,116,97,114,111,119,104,101,105,103,
  104,116,2,16,13,114,101,102,102,111,110,116,104,101,105,103,104,116,2,14,
  0,0,13,116,100,98,115,116,114,105,110,103,103,114,105,100,14,116,100,98,
  115,116,114,105,110,103,103,114,105,100,50,21,102,114,97,109,101,46,115,98,
  118,101,114,116,46,112,97,103,101,115,105,122,101,2,0,8,116,97,98,111,
  114,100,101,114,2,1,8,98,111,117,110,100,115,95,120,3,240,0,8,98,
  111,117,110,100,115,95,121,2,0,9,98,111,117,110,100,115,95,99,120,3,
  162,0,9,98,111,117,110,100,115,95,99,121,2,98,7,111,112,116,105,111,
  110,115,11,15,100,115,103,111,95,97,117,116,111,102,105,101,108,100,115,0,
  14,100,97,116,97,99,111,108,115,46,99,111,117,110,116,2,3,14,100,97,
  116,97,99,111,108,115,46,105,116,101,109,115,14,1,5,119,105,100,116,104,
  2,80,9,100,97,116,97,102,105,101,108,100,6,3,67,76,69,9,116,101,
  120,116,102,108,97,103,115,11,8,116,102,95,114,105,103,104,116,12,116,102,
  95,121,99,101,110,116,101,114,101,100,11,116,102,95,110,111,115,101,108,101,
  99,116,0,0,1,5,119,105,100,116,104,2,80,9,100,97,116,97,102,105,
  101,108,100,6,6,78,84,73,69,82,83,9,116,101,120,116,102,108,97,103,
  115,11,8,116,102,95,114,105,103,104,116,12,116,102,95,121,99,101,110,116,
  101,114,101,100,11,116,102,95,110,111,115,101,108,101,99,116,0,0,1,5,
  119,105,100,116,104,3,144,0,9,100,97,116,97,102,105,101,108,100,6,7,
  77,79,78,84,65,78,84,9,116,101,120,116,102,108,97,103,115,11,8,116,
  102,95,114,105,103,104,116,12,116,102,95,121,99,101,110,116,101,114,101,100,
  11,116,102,95,110,111,115,101,108,101,99,116,0,0,0,19,100,97,116,97,
  108,105,110,107,46,100,97,116,97,115,111,117,114,99,101,7,4,100,115,48,
  50,13,102,105,120,99,111,108,115,46,99,111,117,110,116,2,1,13,102,105,
  120,99,111,108,115,46,105,116,101,109,115,14,1,5,119,105,100,116,104,2,
  15,0,0,13,102,105,120,114,111,119,115,46,99,111,117,110,116,2,1,13,
  102,105,120,114,111,119,115,46,105,116,101,109,115,14,1,6,104,101,105,103,
  104,116,2,16,14,99,97,112,116,105,111,110,115,46,99,111,117,110,116,2,
  3,14,99,97,112,116,105,111,110,115,46,105,116,101,109,115,14,1,7,99,
  97,112,116,105,111,110,6,3,67,76,69,0,1,7,99,97,112,116,105,111,
  110,6,6,78,84,73,69,82,83,0,1,7,99,97,112,116,105,111,110,6,
  7,77,79,78,84,65,78,84,0,0,0,0,13,100,97,116,97,114,111,119,
  104,101,105,103,104,116,2,16,13,114,101,102,102,111,110,116,104,101,105,103,
  104,116,2,14,0,0,12,116,100,98,110,97,118,105,103,97,116,111,114,13,
  116,100,98,110,97,118,105,103,97,116,111,114,49,8,116,97,98,111,114,100,
  101,114,2,2,8,98,111,117,110,100,115,95,120,2,0,8,98,111,117,110,
  100,115,95,121,2,120,10,100,97,116,97,115,111,117,114,99,101,7,4,100,
  115,48,49,20,100,105,97,108,111,103,98,117,116,116,111,110,46,105,109,97,
  103,101,110,114,2,17,17,100,105,97,108,111,103,98,117,116,116,111,110,46,
  104,105,110,116,6,6,68,105,97,108,111,103,18,100,105,97,108,111,103,98,
  117,116,116,111,110,46,115,116,97,116,101,11,11,97,115,95,100,105,115,97,
  98,108,101,100,12,97,115,95,105,110,118,105,115,105,98,108,101,16,97,115,
  95,108,111,99,97,108,100,105,115,97,98,108,101,100,17,97,115,95,108,111,
  99,97,108,105,110,118,105,115,105,98,108,101,17,97,115,95,108,111,99,97,
  108,105,109,97,103,101,108,105,115,116,15,97,115,95,108,111,99,97,108,105,
  109,97,103,101,110,114,18,97,115,95,108,111,99,97,108,99,111,108,111,114,
  103,108,121,112,104,12,97,115,95,108,111,99,97,108,104,105,110,116,17,97,
  115,95,108,111,99,97,108,111,110,101,120,101,99,117,116,101,0,0,0,12,
  116,100,98,110,97,118,105,103,97,116,111,114,13,116,100,98,110,97,118,105,
  103,97,116,111,114,50,8,116,97,98,111,114,100,101,114,2,3,8,98,111,
  117,110,100,115,95,120,3,0,1,8,98,111,117,110,100,115,95,121,2,120,
  10,100,97,116,97,115,111,117,114,99,101,7,4,100,115,48,50,20,100,105,
  97,108,111,103,98,117,116,116,111,110,46,105,109,97,103,101,110,114,2,17,
  17,100,105,97,108,111,103,98,117,116,116,111,110,46,104,105,110,116,6,6,
  68,105,97,108,111,103,18,100,105,97,108,111,103,98,117,116,116,111,110,46,
  115,116,97,116,101,11,11,97,115,95,100,105,115,97,98,108,101,100,12,97,
  115,95,105,110,118,105,115,105,98,108,101,16,97,115,95,108,111,99,97,108,
  100,105,115,97,98,108,101,100,17,97,115,95,108,111,99,97,108,105,110,118,
  105,115,105,98,108,101,17,97,115,95,108,111,99,97,108,105,109,97,103,101,
  108,105,115,116,15,97,115,95,108,111,99,97,108,105,109,97,103,101,110,114,
  18,97,115,95,108,111,99,97,108,99,111,108,111,114,103,108,121,112,104,12,
  97,115,95,108,111,99,97,108,104,105,110,116,17,97,115,95,108,111,99,97,
  108,111,110,101,120,101,99,117,116,101,0,0,0,18,116,109,115,101,115,113,
  108,116,114,97,110,115,97,99,116,105,111,110,4,116,114,97,110,6,65,99,
  116,105,118,101,9,8,68,97,116,97,98,97,115,101,7,3,105,98,99,4,
  108,101,102,116,2,16,3,116,111,112,2,80,0,0,16,116,109,115,101,105,
  98,99,111,110,110,101,99,116,105,111,110,3,105,98,99,9,67,111,110,110,
  101,99,116,101,100,9,12,68,97,116,97,98,97,115,101,78,97,109,101,6,
  31,47,114,111,111,116,47,112,114,111,106,101,99,116,47,70,68,66,47,105,
  110,110,111,112,104,97,114,109,46,102,100,98,8,80,97,115,115,119,111,114,
  100,6,9,109,97,115,116,101,114,107,101,121,11,84,114,97,110,115,97,99,
  116,105,111,110,7,4,116,114,97,110,8,85,115,101,114,78,97,109,101,6,
  6,83,89,83,68,66,65,7,68,105,97,108,101,99,116,2,3,7,111,112,
  116,105,111,110,115,11,12,105,98,111,95,101,109,98,101,100,100,101,100,0,
  4,108,101,102,116,2,24,3,116,111,112,2,24,0,0,12,116,109,115,101,
  115,113,108,113,117,101,114,121,9,109,115,101,109,97,115,116,101,114,6,65,
  99,116,105,118,101,9,6,112,97,114,97,109,115,14,0,8,83,81,76,46,
  100,97,116,97,1,6,31,115,101,108,101,99,116,32,99,108,101,44,99,111,
  100,101,44,108,105,98,32,32,102,114,111,109,32,116,105,101,114,115,0,9,
  73,110,100,101,120,68,101,102,115,14,1,4,78,97,109,101,6,13,82,68,
  66,36,80,82,73,77,65,82,89,57,57,0,0,9,116,97,98,108,101,110,
  97,109,101,6,5,116,105,101,114,115,8,100,97,116,97,98,97,115,101,7,
  3,105,98,99,11,84,114,97,110,115,97,99,116,105,111,110,7,4,116,114,
  97,110,9,70,105,101,108,100,68,101,102,115,14,1,4,78,97,109,101,6,
  3,67,76,69,8,68,97,116,97,84,121,112,101,7,9,102,116,73,110,116,
  101,103,101,114,9,80,114,101,99,105,115,105,111,110,2,255,4,83,105,122,
  101,2,0,0,1,4,78,97,109,101,6,4,67,79,68,69,8,68,97,116,
  97,84,121,112,101,7,8,102,116,83,116,114,105,110,103,9,80,114,101,99,
  105,115,105,111,110,2,255,4,83,105,122,101,2,2,0,1,4,78,97,109,
  101,6,3,76,73,66,8,68,97,116,97,84,121,112,101,7,8,102,116,83,
  116,114,105,110,103,9,80,114,101,99,105,115,105,111,110,2,255,4,83,105,
  122,101,2,40,0,0,23,99,111,110,116,114,111,108,108,101,114,46,102,105,
  101,108,100,115,46,99,111,117,110,116,2,3,24,99,111,110,116,114,111,108,
  108,101,114,46,102,105,101,108,100,115,46,102,105,101,108,100,115,1,1,7,
  10,102,116,95,108,111,110,103,105,110,116,7,9,102,116,95,115,116,114,105,
  110,103,7,9,102,116,95,115,116,114,105,110,103,0,14,1,9,70,105,101,
  108,100,78,97,109,101,6,3,67,76,69,5,73,110,100,101,120,2,0,13,
  80,114,111,118,105,100,101,114,70,108,97,103,115,11,10,112,102,73,110,73,
  110,115,101,114,116,10,112,102,73,110,85,112,100,97,116,101,9,112,102,73,
  110,87,104,101,114,101,7,112,102,73,110,75,101,121,0,0,1,12,68,105,
  115,112,108,97,121,87,105,100,116,104,2,2,9,70,105,101,108,100,78,97,
  109,101,6,4,67,79,68,69,5,73,110,100,101,120,2,1,4,83,105,122,
  101,2,2,0,1,12,68,105,115,112,108,97,121,87,105,100,116,104,2,40,
  9,70,105,101,108,100,78,97,109,101,6,3,76,73,66,5,73,110,100,101,
  120,2,2,4,83,105,122,101,2,40,0,0,0,4,108,101,102,116,2,64,
  3,116,111,112,2,8,0,0,14,116,109,115,101,100,97,116,97,115,111,117,
  114,99,101,4,100,115,48,49,7,68,97,116,97,83,101,116,7,9,109,115,
  101,109,97,115,116,101,114,4,108,101,102,116,2,16,3,116,111,112,2,48,
  0,0,14,116,109,115,101,100,97,116,97,115,111,117,114,99,101,4,100,115,
  48,50,7,68,97,116,97,83,101,116,7,7,109,115,101,100,101,115,116,4,
  108,101,102,116,2,16,3,116,111,112,2,112,0,0,12,116,109,115,101,115,
  113,108,113,117,101,114,121,7,109,115,101,100,101,115,116,6,65,99,116,105,
  118,101,9,6,112,97,114,97,109,115,14,1,8,68,97,116,97,84,121,112,
  101,7,9,102,116,85,110,107,110,111,119,110,4,78,97,109,101,6,1,110,
  9,80,97,114,97,109,84,121,112,101,7,7,112,116,73,110,112,117,116,0,
  0,8,83,81,76,46,100,97,116,97,1,6,57,115,101,108,101,99,116,32,
  99,108,101,44,110,116,105,101,114,115,44,109,111,110,116,97,110,116,32,102,
  114,111,109,32,112,97,105,101,109,110,116,115,32,119,104,101,114,101,32,110,
  116,105,101,114,115,32,61,32,58,110,0,9,73,110,100,101,120,68,101,102,
  115,14,1,4,78,97,109,101,6,13,80,75,95,80,65,73,69,77,78,84,
  83,95,49,0,0,9,116,97,98,108,101,110,97,109,101,6,8,112,97,105,
  101,109,110,116,115,8,100,97,116,97,98,97,115,101,7,3,105,98,99,11,
  84,114,97,110,115,97,99,116,105,111,110,7,4,116,114,97,110,9,70,105,
  101,108,100,68,101,102,115,14,1,4,78,97,109,101,6,3,67,76,69,8,
  68,97,116,97,84,121,112,101,7,9,102,116,73,110,116,101,103,101,114,9,
  80,114,101,99,105,115,105,111,110,2,255,4,83,105,122,101,2,0,0,1,
  4,78,97,109,101,6,6,78,84,73,69,82,83,8,68,97,116,97,84,121,
  112,101,7,9,102,116,73,110,116,101,103,101,114,9,80,114,101,99,105,115,
  105,111,110,2,255,4,83,105,122,101,2,0,0,1,4,78,97,109,101,6,
  7,77,79,78,84,65,78,84,8,68,97,116,97,84,121,112,101,7,5,102,
  116,66,67,68,9,80,114,101,99,105,115,105,111,110,2,18,4,83,105,122,
  101,2,2,0,0,23,99,111,110,116,114,111,108,108,101,114,46,102,105,101,
  108,100,115,46,99,111,117,110,116,2,3,24,99,111,110,116,114,111,108,108,
  101,114,46,102,105,101,108,100,115,46,102,105,101,108,100,115,1,1,7,10,
  102,116,95,108,111,110,103,105,110,116,7,10,102,116,95,108,111,110,103,105,
  110,116,7,6,102,116,95,98,99,100,0,14,1,9,70,105,101,108,100,78,
  97,109,101,6,3,67,76,69,5,73,110,100,101,120,2,0,13,80,114,111,
  118,105,100,101,114,70,108,97,103,115,11,10,112,102,73,110,73,110,115,101,
  114,116,10,112,102,73,110,85,112,100,97,116,101,9,112,102,73,110,87,104,
  101,114,101,7,112,102,73,110,75,101,121,0,0,1,9,70,105,101,108,100,
  78,97,109,101,6,6,78,84,73,69,82,83,5,73,110,100,101,120,2,1,
  0,1,12,68,105,115,112,108,97,121,87,105,100,116,104,2,18,9,70,105,
  101,108,100,78,97,109,101,6,7,77,79,78,84,65,78,84,5,73,110,100,
  101,120,2,2,9,112,114,101,99,105,115,105,111,110,2,18,8,77,97,120,
  86,97,108,117,101,2,0,8,77,105,110,86,97,108,117,101,2,0,4,83,
  105,122,101,2,2,0,0,0,4,108,101,102,116,2,104,3,116,111,112,2,
  72,0,0,15,116,102,105,101,108,100,112,97,114,97,109,108,105,110,107,16,
  116,102,105,101,108,100,112,97,114,97,109,108,105,110,107,49,9,102,105,101,
  108,100,110,97,109,101,6,3,67,76,69,10,100,97,116,97,115,111,117,114,
  99,101,7,4,100,115,48,49,11,100,101,115,116,100,97,116,97,115,101,116,
  7,7,109,115,101,100,101,115,116,9,112,97,114,97,109,110,97,109,101,6,
  1,110,7,111,112,116,105,111,110,115,11,16,102,112,108,111,95,97,117,116,
  111,114,101,102,114,101,115,104,25,102,112,108,111,95,114,101,102,114,101,115,
  104,105,102,99,104,97,110,103,101,100,111,110,108,121,21,102,112,108,111,95,
  115,121,110,99,109,97,115,116,101,114,105,110,115,101,114,116,0,16,100,101,
  115,116,102,105,101,108,100,115,46,99,111,117,110,116,2,1,16,100,101,115,
  116,102,105,101,108,100,115,46,105,116,101,109,115,14,1,10,100,97,116,97,
  115,111,117,114,99,101,7,4,100,115,48,50,13,100,101,115,116,102,105,101,
  108,100,110,97,109,101,6,6,78,84,73,69,82,83,0,0,4,108,101,102,
  116,2,88,3,116,111,112,2,32,0,0,0)
 );

initialization
 registerobjectdata(@objdata,tmainfo,'');
end.
-Create Generator PAIEMNTS_CLE_GEN ;
Create Generator TIERS_CLE_GEN ;

create table PAIEMNTS (
CLE INTEGER not null ,
NTIERS INTEGER not null ,
MONTANT INTEGER not null 
, constraint PAIEMNTS_PK_1 primary key (CLE)
);


create table TIERS (
CLE INTEGER not null ,
CODE CHAR(2) ,
LIB CHAR(20) 
, constraint TIERS_PK_1 primary key (CLE)
);

SET TERM ^ ;
Create Trigger PAIEMNTS_CLE_GEN for PAIEMNTS
ACTIVE
Before Insert
Position 0
AS BEGIN  
IF (NEW.cle IS NULL OR NEW.cle = 0) THEN  
  NEW.cle = GEN_ID(paiemnts_cle_Gen, 1); 
END ^
SET TERM ; ^

SET TERM ^ ;
Create Trigger TIERS_CLE_GEN for TIERS
ACTIVE
Before Insert
Position 0
AS BEGIN  
IF (NEW.cle IS NULL OR NEW.cle = 0) THEN  
  NEW.cle = GEN_ID(tiers_cle_Gen, 1); 
END ^
SET TERM ; ^

alter table PAIEMNTS add constraint FK_PAIEMNTS_1 foreign key (NTIERS) references TIERS (CLE) ;


Grant Select,Update,Insert,Delete,References on PAIEMNTS to SYSDBA with Grant option ;
Grant Select,Update,Insert,Delete,References on TIERS to SYSDBA with Grant option ;

------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
mseide-msegui-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

Reply via email to