Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM General » View Thread |
Messages 1 to 2 of 2 total |
Access DBISAM Tables from a Server Procedure |
Mon, Jul 9 2007 4:11 PM | Permanent Link |
Kevin Kozlowski | I'm using DBISAM v4.25 with Delphi 2007, and am just getting around to using server side
procedures. Could someone point me to an example on how to access (read and update) a DBISAM table from a server procedure? Thanks, -Kevin |
Mon, Jul 9 2007 5:16 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Kevin,
<< I'm using DBISAM v4.25 with Delphi 2007, and am just getting around to using server side procedures. Could someone point me to an example on how to access (read and update) a DBISAM table from a server procedure? >> Just declare the TDBISAMTable component local to the TDBISAMEngine.OnServerProcedure event handler, and make sure to set its SessionName to the same as the ServerSession parameter passed into the event handler like this: procedure TMyForm.ServerProcedure(Sender: TObject; ServerSession: TDBISAMSession; const ProcedureName: String); var TempTable: TDBISAMTable; TempDescription: string; TempPath: string; begin if (AnsiCompareText(ProcedureName,'UpdateMyTable')=0) then begin TempTable:=TDBISAMTable.Create(nil); try Engine.GetServerDatabase('Main',TempDescription,TempPath); with TempTable do begin SessionName:=ServerSession.SessionName; DatabaseName:=TempPath; TableName:='MyTable'; Open; try { Update table here, etc. } finally Close; end; end; finally FreeAndNil(TempTable); end; end; end; -- Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Saturday, May 4, 2024 at 12:54 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |