首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

随笔分类 -  Remobjects使用经验

摘要: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 @ 2011-08-10 09:08 colincode 阅读(1246) 评论(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 ; FieldByName( 阅读全文

posted @ 2011-08-09 15:16 colincode 阅读(584) 评论(0) 推荐(0)

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

posted @ 2011-08-09 15:15 colincode 阅读(472) 评论(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 * from 阅读全文

posted @ 2011-08-09 15:09 colincode 阅读(808) 评论(0) 推荐(0)

摘要:if SQLConnection.InTransaction then begin ShowMessage('数据库服务忙,请稍候保存'); exit; end; 阅读全文

posted @ 2011-08-09 14:52 colincode 阅读(1035) 评论(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&# 阅读全文

posted @ 2011-08-09 14:49 colincode 阅读(592) 评论(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 @ 2011-08-09 14:46 colincode 阅读(521) 评论(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'; linp := DataParamet 阅读全文

posted @ 2011-08-09 12:06 colincode 阅读(650) 评论(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], [eCode.Text,eFirstName.Text,eLastName.Text, eCity.Text], opAnd); 阅读全文

posted @ 2010-12-21 16:08 colincode 阅读(652) 评论(0) 推荐(0)

摘要:原来的Client的ApplyUpdatesError事件己经没有了换成 Client的RemoteDataAdapter的 BeforeProcessFailures 事件Server:ProcessorAfterProcessChange事件或ProcessorBeforeProcessChangeCanRemoveFromDelta := FALSE;case aChange.ChangeT... 阅读全文

posted @ 2010-11-24 11:22 colincode 阅读(1080) 评论(0) 推荐(0)