Board index » off-topic » Re: Multiple apps sharing TSQLConnection in separate app
Craig Stuntz [TeamB]
Delphi Developer |
Craig Stuntz [TeamB]
Delphi Developer |
Re: Multiple apps sharing TSQLConnection in separate app2006-03-24 12:41:36 AM off-topic15 Ed Blanchard wrote: QuoteSo, any suggestions on best approach? The "find ConnectMe or start if Craig Stuntz [TeamB] ?Vertex Systems Corp. ?Columbus, OH Delphi/InterBase Weblog : blogs.teamb.com/craigstuntz How to ask questions the smart way: www.catb.org/~esr/faqs/smart-questions.html |
Craig Stuntz [TeamB]
Delphi Developer |
2006-03-24 12:42:19 AM
Re:Re: Multiple apps sharing TSQLConnection in separate app
Oh, do note that this will generally not change your DB licensing
requirements, though. I don't know why you want only one connection, but if it's to save money on DB server licenses it won't help. -- Craig Stuntz [TeamB] ?Vertex Systems Corp. ?Columbus, OH Delphi/InterBase Weblog : blogs.teamb.com/craigstuntz Borland newsgroup denizen Sergio González has a new CD of Irish music out, and it's good: tinyurl.com/7hgfr |
Ed Blanchard
Delphi Developer |
2006-03-24 01:21:49 AM
Re:Re: Multiple apps sharing TSQLConnection in separate app
I'd like to set up a situation whereby I have an application that is
essentially a datamodule with a TSQLConnection waiting to be linked to TSQLDatasets from other running applications. That is, have a hidden app (ConnectMe.exe) running but not connected to SQL back-end. I'd then have any number of independent applications that, when started, would find ConnectMe.exe and assign their TSQLDataset.SQLConnection to ConnectMe's SCN. All of this will be running on single workstations (that is, each workstation will have their own ConnectMe, App1, App2...). The notion here is that ConnectMe will quietly disconnect automatically from SQL after some pre-determined time, but stay live long enough to allow the end-user to run app1, app2, app3 (or app(n) over and over) without having to wait for connect/authentication every time. These are reports run from third-party application (which maintains it's own SQL connection in a Powerbuilder app) - the PB app will call my apps with command line params - I'm trying to make it look like my apps are "integrated" into the PB main app - tough to do when it takes a few seconds just to connect... <g> So, any suggestions on best approach? The "find ConnectMe or start if not running" I can handle - I'm looking for guidance on how to best use a shared TSQLConnection in a separate app. TIA Cheers, EdB {smallsort} |
Ed Blanchard
Delphi Developer |
2006-03-24 02:31:13 AM
Re:Re: Multiple apps sharing TSQLConnection in separate app
In article <4422ddfb$ XXXX@XXXXX.COM >,
XXXX@XXXXX.COM says... QuoteOh, do note that this will generally not change your DB licensing I've a dozen or so D7Ent/Reportbuilder custom reports that I've built into a single custom app (using one TSQLConnection) - which of course is run separately from the PB App. Now the users would like to see each of these reports integrated into the main PB app in the "right screens". The PB app has form customizing such that I can add a button anywhere I want to shell out and call an exe with command-line parameter (eg. "PrintWorkOrder.exe 10000" ). The problem with this is that each time one of my report apps will be called, there's a delay based on establishing the connection. I'm looking for a way to have an app run in the background to keep the connection live, and just set the report app's TSQLDataset.SQLConnection to the background TSQLConnection... The DB server licensing is such that EACH workstation pays for one seat for the PB app, and one seat for all my custom apps (eg 2 seats per workstation). Not sure how that works but the vendor assures me that I'm "in compliance". Thanks. EdB |
Craig Stuntz [TeamB]
Delphi Developer |
2006-03-24 02:31:18 AM
Re:Re: Multiple apps sharing TSQLConnection in separate app
Ed Blanchard wrote:
QuoteAs I understand this, in ConnectMe App I'd have TSQLConnection, QuoteThis won't work for me - I change the TSQLDataSet.commandtext at run Craig Stuntz [TeamB] ?Vertex Systems Corp. ?Columbus, OH Delphi/InterBase Weblog : blogs.teamb.com/craigstuntz All the great TeamB service you've come to expect plus (New!) Irish Tin Whistle tips: learningtowhistle.blogspot.com |
Ed Blanchard
Delphi Developer |
2006-03-24 03:19:07 AM
Re:Re: Multiple apps sharing TSQLConnection in separate app
In article <4422ddd0$ XXXX@XXXXX.COM >,
XXXX@XXXXX.COM says... QuoteEd Blanchard wrote: In App1, App2, App(n) I'd have TCDSProvider and TCDS... This won't work for me - I change the TSQLDataSet.commandtext at run time based on user input (not just simple parameters - sometimes as much as 50% of SQL is changed - different tables, unions added etc). Am I missing something? What I'm afraid I'll have to do is a "plugin" system, where I distribute a helper app and DLL for every new report. That is, have my ConnectMe app running with live TSQLConnection. I'll then create a helperApp for every report to be invoked from PowerBuilder with a cmd line param. This helperApp will then call ConnectMe with "registering reportOne param=xxxx". The ConnectMe app then calls the appropriate package/dll report... <ugly>. EdB |
Ed Blanchard
Delphi Developer |
2006-03-24 06:57:48 AM
Re:Re: Multiple apps sharing TSQLConnection in separate app
In article < XXXX@XXXXX.COM >, XXXX@XXXXX.COM
says... QuoteEd Blanchard wrote: and a code snippet with: procedure TCDSProvider.InitAppServer; and somehow by the time I closed the browser and returned to newsreader that came out as "ClientDatasetProvider.DataSetProvider" I need a holiday. Quote>This won't work for me - I change the TSQLDataSet.commandtext at run TSQLDataset and TDatasetProvider components as TCDS components? In other words, will I have to update the TSQLConnection datamodule everytime I add a new app with new CDS definitions? What if more than one app accessing data concurrently (or multiple instances of one app)? Thanks again Craig. (Time for me to hit the bookshelf again) Cheers, EdB |
Craig Stuntz [TeamB]
Delphi Developer |
2006-03-24 07:43:06 PM
Re:Re: Multiple apps sharing TSQLConnection in separate app
Ed Blanchard wrote:
QuoteOk, one last question (ha!) before I go test this out: do I need as blogs.teamb.com/craigstuntz/articles/IBInAMultiTierWorld.aspx QuoteWhat if more than one app accessing data concurrently (or multiple Craig Stuntz [TeamB] ?Vertex Systems Corp. ?Columbus, OH Delphi/InterBase Weblog : blogs.teamb.com/craigstuntz Want to help make Delphi and InterBase better? Use QC! qc.borland.com -- Vote for important issues |
Ed Blanchard
Delphi Developer |
2006-03-27 11:08:19 PM
Re:Re: Multiple apps sharing TSQLConnection in separate app
In article <4423e95a$ XXXX@XXXXX.COM >,
XXXX@XXXXX.COM says... QuoteEd Blanchard wrote: |