: integer;:=High (FldArr) +1; (FldArr, FieldCount + 1); FldArr [FieldCount] do begin:=FieldName; AnsiUppercase (FieldType)= INTEGER then fieldtype:= i4 elseAnsiUppercase (FieldType)= SMALLINT then fieldtype:= i2 elseAnsiUppercase (FieldType)= FLOAT then fieldtype:= r8 elseAnsiUppercase (FieldType)= DOUBLE PRECISION then fieldtype:= r8 AnsiUppercase (FieldType)= NUMERIC then fieldtype:= r8 elseAnsiUppercase (FieldType)= DECIMAL then fieldtype:= r8 elseAnsiUppercase (FieldType)= DATE then fieldtype:= dateTime elseAnsiUppercase (FieldType)= CHAR then fieldtype:= FixedChar elseAnsiUppercase (FieldType)= VARCHAR then fieldtype:= string raquo ;;:=Length ;;; GetDataFromMemory (var CDSetBuf:; ParamsList: DynArrayOfVariant);=2500 ;: integer ;: double ;: TDateTime ;: string ;: integer;: DynArrayOfVariant;:=0 ;:=0;:=NullDate;:= raquo ;; Length (ParamsList) gt; 0 then begin:=StrToInt(ParamsList[0]);:=StrToFloat(ParamsList[1]);:=StrToDateTime(ParamsList[2]);:=ParamsList[3];;
Додаток 3
Лістинг файлу WorkClientForm_U.pas
WorkClientForm_U ;, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms ,, UCDM, Grids, DBGrids, DB, DBClient, MConnect, DBTables ,, Buttons, JobsAppSrv_TLB, Mask, DBCtrls, ComCtrls , ExtCtrls ,, SConnect;=class (TForm): TDataSource ;: TClientDataSet ;: TPanel ;: TBitBtn ;: TPageControl ;: TTabSheet ;: TTabSheet ;: TDBGrid ;: TPanel ;: TPanel ;: TBitBtn ;: TDBGrid ;: TDataSource;:TClientDataSet ;: TEdit ;: TLabel ;: TLabel ;: TEdit ;: TBitBtn ;: TSimpleObjectBroker ;: TDCOMConnection ;: TLabel ;: TEdit ;: TEdit ;: TLabel ;: TSocketConnection; BitBtn2Click (Sender: TObject); BitBtn5Click (Sender: TObject); ClientDataSet5BeforeGetRecords (Sender: TObject; OwnerData: OleVariant); Button2Click (Sender: TObject); BitBtn6Click (Sender: TObject);
{Private declarations}: IJobsDisp ;: TMemoryStream;: TStringList; GetDataFromMemory (Sender: TObject);
{Public declarations} ;: TWorkClientTestForm ;: Exception; _Cursor: TCursor; PasswordDlg_U;
{$ R * .dfm} HourGlassCursor; _Cursor:=Screen.Cursor; .Cursor:=crHourGlass ;; NormalCursor; .Cursor:=Save_Cursor ;; TWorkClientTestForm.BitBtn2Click (Sender: TObject) ;: OleVariant ;: integer ;: integer;, HostName: string ;: array [0..255] of char ;: dword; true doPasswordDlg do begin.Caption:=Ok; Showmodal=mrOK then begin; .Connected:=false; i :=0 to SObjBroker.Servers.Count - 1 do.Servers[i].Enabled:=SObjBroker.Servers[i].ComputerName=cb.Text;.Connected:=true;:=IJobsDisp(IDispatch(DCOMConCommon.AppServer));:=laquo;raquo;;:=255;(@sbuf,pBufLen);:=string(sbuf);:=JobsInterface.AppSrvConnect(HostName,UserName.text,Password.Text)
;
//s:= localhost raquo ;; Pos (ch, s) gt; 0 then:=StrToInt(laquo;raquo;);.Enabled:=true;.Text:=s;.Text:=cbAppServerName.Text;.Enabled:=false;;MessageDlg(Message, 0) lt; gt; mrYes then ;; E: Exception doMessageDlg (Message, 0) lt; gt; mrYes then ;; break ;;;; TWorkClientTestForm.BitBtn5Click (Sender: TObject) ;. CommandText:=Edit1.Text; (ClientDataSet5) ;; TWorkClientTestForm.ClientDataSet5BeforeGetRecords (: TObject; var OwnerData: OleVariant); (Sender) ;;