摘要: 原来的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 阅读(259) 评论(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 阅读(256) 评论(0) 推荐(0) 编辑
摘要: 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 阅读(283) 评论(0) 推荐(0) 编辑
摘要: 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 阅读(218) 评论(0) 推荐(0) 编辑
摘要: 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 阅读(264) 评论(0) 推荐(0) 编辑
摘要: 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 阅读(316) 评论(0) 推荐(0) 编辑
摘要: 关于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 阅读(180) 评论(0) 推荐(0) 编辑
摘要: 其实很简单,要充分利用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 阅读(271) 评论(0) 推荐(0) 编辑
摘要: 八、数据敏感控件的制作。Delphi的一大亮点就是它的数据库开发能力。而数据敏感组件则在这中间起着很重要的作用。在Delphi的Data Control页面下的控件都是用于显示和编辑数据库中的数据的。相信大家已经体会到数据敏感控件的好处了。我们这一节就给大家演示一下数据敏感控件的开发方法。需要提醒大家的是,不像其他体系的控件,数据敏感控件并没有一个统一的基类,只要是从TwinControl类或其子类派生就可以,数据敏感控件的特殊之处就在于我们下面提到的数据连接。相信用Delphi开发过数据库的人一定对delphi中没有一个日期数据敏感控件而恼火。每次都要我们自己处理数据的更新与显示。所以我们就 阅读全文
posted @ 2013-07-23 13:35 leon_kin 阅读(312) 评论(0) 推荐(0) 编辑