随笔分类 -  RemObject

Server端更新数据后通知Client端显示
摘要:原来的Client的ApplyUpdatesError事件己经没有了换成 Client的RemoteDataAdapter的 BeforeProcessFailures 事件Server:ProcessorAfterProcessChange事件或ProcessorBeforeProcessChangeCanRemoveFromDelta := FALSE; case aChange.ChangeType of ctInsert : begin customerid := aChange.NewValueByName['CustomerID']; aChange... 阅读全文

posted @ 2013-07-23 16:00 leon_kin 阅读(275) 评论(0) 推荐(0)

客户端动态条件
摘要:有两种方法:一、首先要设置服务端的服务AllowWhereSQL为True;客户端with ClientDataModule.dtCustomers do begin Close; // Prepares the custom WHERE clause Where.Clear; Where.AddConditions(['CustomerIdx','FirstName','LastName','City'], [cEqual,cLike,cLike,cLike], [eCo... 阅读全文

posted @ 2013-07-23 15:58 leon_kin 阅读(264) 评论(0) 推荐(0)

DA中直接运行SQL命令,并返回影响行数
摘要:1 、 客户端直接运行SQL命令 , 使用TDARemoteCommand2 、 服务器端直接运行SQL命令 , 使用TDALocalCommandfunction DeleteRowFromTable1(aID: integer): integer;var lCommand: TDALocalCommand; linp, lout: DataParameterArray; i: integer;begin try lCommand := TDALocalCommand.Create(nil); lCommand.ServiceName := 'MyService'; ... 阅读全文

posted @ 2013-07-23 15:51 leon_kin 阅读(307) 评论(0) 推荐(0)

DA的存储过程 服务器端返回参数的应用方法
摘要:function TTJService.RQ_singleOP(const Rq_singlestru: STRU_RQ_L1): Integer; var acon: IDAConnection; SqlCMD: IDASQLCommand; SqlDST: IDADataset; sqltext: string; it:Integer; begin acon :=DAConnectionManager.NewConnection('EmployeeIBO', TRUE);; result :=0; try SqlCMD :=acon.NewCommand('RQOP 阅读全文

posted @ 2013-07-23 15:46 leon_kin 阅读(230) 评论(0) 推荐(0)

IDASQLCommand用法(包含事务)
摘要:procedure DoLogout(const Session:TROSession; Connection:IDAConnection; ServerLog:TDAServerLog);var Cmd : IDASQLCommand; CommandLog:TDASQLCommandLog; ErrorLog:TDASQLErrorLog;begin if (LogoutCommand'') then Cmd := ServiceSchema.NewCommand(Connection, 'Logout', ['SessionID'], [G 阅读全文

posted @ 2013-07-23 15:45 leon_kin 阅读(273) 评论(0) 推荐(0)

RO 本地sql动态指令检索使用方法
摘要:procedure TForm1.btn3Click(Sender: TObject); var lDataSet:IDADataSet; lConnection:IDAConnection ; stream: Binary; mytbl:TDAMemDataTable ; begin mytbl :=tbl1; lConnection := DAConnectionManager.NewConnection(DAConnectionManager.Connections[0].Name); lDataSet := lConnection.NewDataset('select * fr 阅读全文

posted @ 2013-07-23 15:39 leon_kin 阅读(338) 评论(0) 推荐(0)

DA EventRespository的应用
摘要:关于DA的事件的应用于理解 例子 FIleextendedtransfer 客户端 向服务器端提交 服务端时候,服务端可以同时让事件进行触发的操作。 事件触发以后,会向自己或者其他的客户端执行特殊的 客户端的部分的指令,如 download.... 服务器端是被动触发,触发后执行客户端指令。 比较有意思。 我们还可以对照聊天的例子。 httpchat的例子 { 服务端的代码} procedure TChatServerService.Talk(const Message: String); var ev: IChatEvents_Writer; begin ev := (EventReposi 阅读全文

posted @ 2013-07-23 15:37 leon_kin 阅读(194) 评论(0) 推荐(0)

RO dataabstract 如何使用text,或者是image字段(sqlserver)
摘要:其实很简单,要充分利用memorystream. 一存储text字段为例 1.如何进行存储? var ms:TmemoryStream; ms:=TMemoryStream .Create ; {将richedit的内容读取到内存流,并能存储}Frmtongzhi.Editor.Lines.SaveToStream(ms); ms.Seek(0,soFromBeginning ); with tbl_tongzhi do begin Edit; FieldByName('djtime').AsDateTime :=Frmtongzhi.bdate.date ; ... 阅读全文

posted @ 2013-07-23 15:35 leon_kin 阅读(292) 评论(0) 推荐(0)

DA服务器端 执行SQL命令 和查询 SQL语句
摘要:procedure TNewService.testoperation;var Cmd : IDASQLCommand; acon: IDAConnection; SqlDST: IDADataset;begin acon := ServerDataModule.ConnectionManager.NewConnection('New ADO Connection to ColinCodeData',true) ; Cmd := acon.NewCommand('',stSQL); Cmd.SQL := 'update table_1 set a = & 阅读全文

posted @ 2013-07-20 18:04 leon_kin 阅读(307) 评论(0) 推荐(0)