Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB SQL » View Thread |
Messages 1 to 10 of 12 total |
LocalConfigPath in a procedure |
Tue, Mar 29 2016 11:40 AM | Permanent Link |
Adam Brett Orixa Systems | In Delphi my EDBSession component has a LocalConfigPath property. Even if I am connected to a Remote DB via IP address there is a value in here.
This allows me (in Delphi) to write code like: Path:= MySession.LocalConfigPath + '\Reports\2016'; I cannot see a similar variable accessible in SQL. I would like to access it when running a DLL that generates a PDF file. Is it possible to determine the "root path" of a remote database connection via SQL? ... I understand it might be made inaccessible for security reasons. |
Tue, Mar 29 2016 12:45 PM | Permanent Link |
Uli Becker | Adam,
> Is it possible to determine the "root path" of a remote database connection via SQL? How about handling that with stores? Uli |
Tue, Mar 29 2016 4:30 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Adam,
<< In Delphi my EDBSession component has a LocalConfigPath property. Even if I am connected to a Remote DB via IP address there is a value in here. >> Yes, but just clarify: that value has nothing to do with the remote EDB Server, and is also ignored for local sessions unless the TEDBEngine.UseLocalSessionEngineSettings property is set to True. << I cannot see a similar variable accessible in SQL. I would like to access it when running a DLL that generates a PDF file. >> So, is the DLL an external module ? If so, an external module isn't going to have access to any configuration information other than these public properties/methods of the TEDBExternalModule class: property ConfigPath: String read GetConfigPath; property TempTablesPath: String read GetTempTablesPath; property Params: TParams read FParams; procedure SendProgress(PercentDone: Integer; var Continue: Boolean); procedure SendStatusMessage(const StatusMsg: String); procedure SendLogMessage(const LogMsg: String); So, if by "root path", you mean "config path", then yes, you can get it from an external module DLL. Tim Young Elevate Software www.elevatesoft.com |
Wed, Mar 30 2016 5:21 AM | Permanent Link |
Adam Brett Orixa Systems | Tim and Uli,
Thanks for this, I'll check ConfigPath and Uli you are right I could create a store with the path I need and query to return this. I am a bit hesitant to create a "root" store which shows the path of my config-folder because this would allow people to call DELETE FILE FROM STORE and delete some pretty important files. But I guess if they are already in to the point of querying the list of stores ... they can do pretty much anything. |
Wed, Mar 30 2016 6:02 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Adam
I have the details in an ini file - depending on which is line 1 you get c/s or f/s. Unless you're storing the path info in the dfm then I would assume you have an external resource to load from so you could use that. If you like something a bit sneakier you could use the attributes for the database, a specific table or one of the users Roy Lambert |
Wed, Mar 30 2016 10:19 AM | Permanent Link |
Adam Brett Orixa Systems | Thanks Roy,
Generally I keep the log-on info, including a config path in the Registry, so I could look there. I was really curious whether there was a way of getting it without needing the registry resource, as it would mean one less thing to check for and one less thing that might go wrong. The ConfigPath property of the Module actually does what I need. DLLs are still bending my head a bit, as they are so independent of all other parts of the EXE and are non-VCL. Accessing them through SQL is really cool though, as it makes it easy to set up quite complex programmatic automated actions and then run these through EDB Jobs as and when needed. |
Thu, Apr 7 2016 5:58 PM | Permanent Link |
Steve Gill | Hi Adam,
<< Accessing them through SQL is really cool though, as it makes it easy to set up quite complex programmatic automated actions and then run these through EDB Jobs as and when needed. >> They are fantastic. I use external modules for getting folder locations, sending notification emails and SMS messages to administrators, copying backup files to DropBox, and so on. = Steve |
Fri, Apr 8 2016 7:51 AM | Permanent Link |
Uli Becker | Steve,
<< ...sending notification emails and SMS messages to administrators, copying backup files to DropBox, and so on. Just out of interest: how do you send SMS with Delphi? Uli |
Fri, Apr 8 2016 8:52 AM | Permanent Link |
Steve Gill | Hi Uli,
<< Just out of interest: how do you send SMS with Delphi? >> I use SMS gateways like SMS Global, Clickatel, and send messages using their APIs.. = Steve |
Fri, Apr 8 2016 10:22 AM | Permanent Link |
Uli Becker | > I use SMS gateways like SMS Global, Clickatel, and send messages using their APIs..
Thanks, Steve! Uli |
Page 1 of 2 | Next Page » | |
Jump to Page: 1 2 |
This web page was last updated on Monday, April 29, 2024 at 05:23 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |