Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM Client/Server » View Thread |
Messages 1 to 9 of 9 total |
Triggering server procedure from Admin module |
Mon, Jan 8 2007 8:36 PM | Permanent Link |
Kerry Neighbour | I am using DBISAM 4.25 C/s. I have a server event that backs up the databases
(just as in the Help manual). This works fine. What I want to do is trigger this backup event from the ServerAdmin program. ie a button that says "Backup Now". To do this I have setup a ServerProcedure like this procedure TMainForm.ServerEngineServerProcedure(Sender: TObject; ServerSession: TDBISAMSession; const ProcedureName: string); begin if (AnsiCompareText(ProcedureName, 'Daily Backup') = 0) then begin DoBackup; end; end; In ServerAdmin (which is basically the ServerAdm program supplied with DBISAM) I have the procedure TMainForm.btnTriggerNowClick(Sender: TObject); begin with RemoteSession do begin try CallRemoteProcedure('Daily Backup'); <--- error here except ShowMessage('There was an error'; end; end; end; This always gives me an error (an exception error) when I try to call the "CallRemoteProcedure" call. I have created the Remote Procedure and assigned user rights to Execute (using the ServerAdm program). Any clues as to why the server procdure call is not working? Is there a better way to get the backup event to work on demand? Kerry Neighbour |
Tue, Jan 9 2007 3:30 AM | Permanent Link |
"Frans van Daalen" | "Kerry Neighbour" <kneighbour@securedoc.com.au> wrote in message news:639022ca3771f8c901f8b189b6d8@news.elevatesoft.com... >I am using DBISAM 4.25 C/s. I have a server event that backs up the >databases (just as in the Help manual). This works fine. What I want to do >is trigger this backup event from the ServerAdmin program. ie a button that >says "Backup Now". To do this I have setup a ServerProcedure like this > > procedure TMainForm.ServerEngineServerProcedure(Sender: TObject; > ServerSession: TDBISAMSession; const ProcedureName: string); > begin > if (AnsiCompareText(ProcedureName, 'Daily Backup') = 0) then > begin > DoBackup; > end; > end; > > In ServerAdmin (which is basically the ServerAdm program supplied with > DBISAM) I have the > procedure TMainForm.btnTriggerNowClick(Sender: TObject); > begin > with RemoteSession do > begin > try > CallRemoteProcedure('Daily Backup'); <--- error here > except > ShowMessage('There was an error'; > end; > end; > end; > > This always gives me an error (an exception error) when I try to call the > "CallRemoteProcedure" call. I have created the Remote Procedure and > assigned user rights to Execute (using the ServerAdm program). > > Any clues as to why the server procdure call is not working? Is there a > better way to get the backup event to work on demand? > why not ---------------- procedure TMainForm.btnTriggerNowClick(Sender: TObject); begin DoBackup end; ----------------- remotesession is more for the client side |
Tue, Jan 9 2007 8:34 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Kerry,
<< This always gives me an error (an exception error) when I try to call the "CallRemoteProcedure" call. I have created the Remote Procedure and assigned user rights to Execute (using the ServerAdm program). >> Admin sessions cannot executed server-side procedures or do other database-related work. They can only do limited admin functions like add/remove databases, database users, etc. You'll need to use a separate remote session with the session settings copied over from the session being used in the admin utility (except for the port, which should use 12005 instead of 12006) to call the remote procedure. -- Tim Young Elevate Software www.elevatesoft.com |
Tue, Jan 9 2007 5:10 PM | Permanent Link |
Kerry Neighbour | Tim Young [Elevate Software] wrote:
> Admin sessions cannot executed server-side procedures or do other > database-related work. They can only do limited admin functions like > add/remove databases, database users, etc. Ok - that makes sense. Will give it a try. |
Tue, Jan 9 2007 5:10 PM | Permanent Link |
Kerry Neighbour | Frans van Daalen wrote:
> why not > ---------------- > procedure TMainForm.btnTriggerNowClick(Sender: TObject); > begin > DoBackup > end; > ----------------- > > remotesession is more for the client side > > This is client side - in fact, in the ServerAdmin program. |
Tue, Jan 9 2007 5:32 PM | Permanent Link |
Kerry Neighbour | Tim Young [Elevate Software] wrote:
> Admin sessions cannot executed server-side procedures or do other > database-related work. They can only do limited admin functions like > add/remove databases, database users, etc. One thing I found - it is impossible to add two TDBISAMSession components to the same form. I do not know if this is what you want, but it does not allow you to do it. I guess I can create the thing in code on the fly, but it does not seem correct. I can put session controls on different forms. however.... |
Wed, Jan 10 2007 4:30 AM | Permanent Link |
"Frans van Daalen" | "Kerry Neighbour" <kerry@dojitraders.com> wrote in message news:DB5E7575-7365-40DE-90EA-8237B8CCBC46@news.elevatesoft.com... > Tim Young [Elevate Software] wrote: >> Admin sessions cannot executed server-side procedures or do other >> database-related work. They can only do limited admin functions like >> add/remove databases, database users, etc. > > One thing I found - it is impossible to add two TDBISAMSession components > to the same form. I do not know if this is what you want, but it does not > allow you to do it. > > I guess I can create the thing in code on the fly, but it does not seem > correct. > > I can put session controls on different forms. however.... I have a datamodule with 3 sessions on it. 1 for admin functions and 2 for "normal" functions |
Wed, Jan 10 2007 4:30 AM | Permanent Link |
"Frans van Daalen" | "Kerry Neighbour" <kerry@dojitraders.com> wrote in message news:8CE7B434-358D-4871-B87D-FD504A385859@news.elevatesoft.com... > Frans van Daalen wrote: >> why not >> ---------------- >> procedure TMainForm.btnTriggerNowClick(Sender: TObject); >> begin >> DoBackup >> end; >> ----------------- >> >> remotesession is more for the client side >> >> > > This is client side - in fact, in the ServerAdmin program. Aaa...missed that |
Wed, Jan 10 2007 5:30 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Kerry,
<< One thing I found - it is impossible to add two TDBISAMSession components to the same form. I do not know if this is what you want, but it does not allow you to do it. >> It most certainly does. You can put 50 session components on there if you want. Are you getting an error ? -- Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Friday, April 19, 2024 at 07:09 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |