![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM Client/Server » View Thread |
Messages 1 to 2 of 2 total |
![]() |
Thu, Dec 7 2006 11:01 PM | Permanent Link |
KK Aw | I have done the following but cannot seem to activate the server-side procedure.
a) Added the following procedure to the Dbsrvr procedure TMainForm.ServerEngineServerProcedure(Sender: TObject; ServerSession: TDBISAMSession; const ProcedureName: string); begin if (AnsiCompareText(ProcedureName, 'DownloadFile') = 0) then << breakpoint begin .. end; end; b) Use the server admin to: i) Added “DownloadFile” to the list of Procedures ii) Define the procedure users with execute rights c) On the client side I have the following code: With Datamodule1.DBISAMSession1 do Try RemoteAddress := cfgInfo.DbServerIP; RemotePassword := cfgInfo.DbServerPwd; RemoteUser := 'xxxx'; KeepConnections := True; {2005.05.16} RemoteCompression:= 6; {2006.12.08} SessionType := stRemote; SessionName := 'ServerProcSession'; Active:= True; RemoteParams.CreateParam(ftString,'FilePath').AsString:= Src; Try CallRemoteProcedure('DownloadFile'); if RemoteParams.ParamByName('Result').AsBoolean then << FAIL begin RemoteParams.ParamByName('File').savetoStream(aStream); aStream.Position:= 0; end; except Raise; end; finally Active:= False; end; d) I have two Delphi IDE Running, one for the server and the other for the client. When the codes on the client side is run, the breakpoint on the server is not triggered and it fail on the line indicated. I can access the database tables on the server with no problems. What have I missed? Regards, KK Aw |
Fri, Dec 8 2006 9:51 AM | Permanent Link |
kk aw | I think I know what I missed. Will test when I get to the office.
KK Aw KK Aw wrote: > I have done the following but cannot seem to activate the server-side procedure. > > a) Added the following procedure to the Dbsrvr > > procedure TMainForm.ServerEngineServerProcedure(Sender: TObject; > ServerSession: TDBISAMSession; const ProcedureName: string); > > begin > if (AnsiCompareText(ProcedureName, 'DownloadFile') = 0) then << breakpoint > begin > .. > end; > end; > > b) Use the server admin to: > i) Added “DownloadFile” to the list of Procedures > ii) Define the procedure users with execute rights > > c) On the client side I have the following code: > With Datamodule1.DBISAMSession1 do > Try > RemoteAddress := cfgInfo.DbServerIP; > RemotePassword := cfgInfo.DbServerPwd; > RemoteUser := 'xxxx'; > KeepConnections := True; {2005.05.16} > RemoteCompression:= 6; {2006.12.08} > SessionType := stRemote; > SessionName := 'ServerProcSession'; > Active:= True; > RemoteParams.CreateParam(ftString,'FilePath').AsString:= Src; > Try > CallRemoteProcedure('DownloadFile'); > if RemoteParams.ParamByName('Result').AsBoolean then << FAIL > begin > RemoteParams.ParamByName('File').savetoStream(aStream); > aStream.Position:= 0; > end; > except > Raise; > end; > finally > Active:= False; > end; > > d) I have two Delphi IDE Running, one for the server and the other for the client. When > the codes on the client side is run, the breakpoint on the server is not triggered and it > fail on the line indicated. > > I can access the database tables on the server with no problems. What have I missed? > > Regards, > KK Aw > |
This web page was last updated on Wednesday, August 14, 2024 at 07:31 PM | Privacy Policy![]() © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |