Article View: borland.public.cppbuilder.database.multi-tier
Article #903Re: Switching SQL on the server as needed ...
From: Patrick Martin
Date: Mon, 01 Jan 2001 23:48
Date: Mon, 01 Jan 2001 23:48
68 lines
3096 bytes
3096 bytes
This is a multi-part message in MIME format. --------------7B3E655DDE2F7FDF8757477A Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit If your SQL does not need to be dynamically generated, then just use TStrings::LoadsFromFile to reload the SQL text. As long as you are careful to specify the type of parameters (if used) when setting their values, you will be able to refresh the SQL whenever you want, and carry straight on. If the SQL needs to be built dynamically, you could use some way of returning a generator call, like a dll. Just unload and reload a new dll version with the updated code. The next step would be to have a remote SQL provider interface, and an application that supplies SQL over remote procedure calls (or is that too much?). HTH Patrick Nick Rambarransingh wrote: > Good Day All, > > How would I do this? Lets say I have a MIDAS client/server app. I > want to prewrite my sql, and and keep them in ascii files on the > server. This way, if there are mods to be done, I modify the SQL ascii > file, and not have to recompile. > > So, I am trying to figure out, if I had many different SQL files, and > I wanted to let the client press a button that would cause the TQuery on > the server to close, load the new sql commands, and then open, how would > I go about something like this ? > > Thanks, Nick > Borland Forever .... --------------7B3E655DDE2F7FDF8757477A Content-Type: text/x-vcard; charset=us-ascii; name="patrickmmartin.vcf" Content-Transfer-Encoding: 7bit Content-Description: Card for Patrick Martin Content-Disposition: attachment; filename="patrickmmartin.vcf" begin:vcard n:Martin;Patrick tel;pager:na tel;cell:07773013982 tel;fax:na tel;home:01483 303496 tel;work:na x-mozilla-html:TRUE url:http://www.freenetpages.co.uk/hp/patrickmmartin/ adr:;;72 Stoke Fields;Guildord;Surrey;;UK version:2.1 email;internet:patrickmmartin@freenet.co.uk title:Dr. note:This is Patrick's home vcard x-mozilla-cpt:;20176 fn:Patrick Michael Martin end:vcard --------------7B3E655DDE2F7FDF8757477A--
Technical Details
Message-ID:
<3A511734.5F4642F9@freenet.co.uk>Path:
arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!xfer13.netnews.com!netnews.com!ams-newsfeed.speedport.net!ldn-newsfeed.speedport.net!newsfeed.speedport.net!naxos.belnet.be!news.belnet.be!bornews.borland.com!dnews!212.1.136.57References:
<3A4A78C4.88C25C78@Videotron.ca>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fcd2b,3817f3f5d0117935 X-Google-Attributes: gidfcd2b,public X-Google-ArrivalTime: 2001-01-01 15:44:07 PST Message-ID: <3A511734.5F4642F9@freenet.co.uk> Date: Mon, 01 Jan 2001 23:48:04 +0000 From: Patrick Martin <patrickmmartin@freenet.co.uk> X-Mailer: Mozilla 4.76 [en] (Win95; U) X-Accept-Language: en,fr MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.database.multi-tier Subject: Re: Switching SQL on the server as needed ... References: <3A4A78C4.88C25C78@Videotron.ca> Content-Type: multipart/mixed; boundary="------------7B3E655DDE2F7FDF8757477A" NNTP-Posting-Host: 212.1.136.57 X-Trace: 1 Jan 2001 15:42:20 -0800, 212.1.136.57 Lines: 69 Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!xfer13.netnews.com!netnews.com!ams-newsfeed.speedport.net!ldn-newsfeed.speedport.net!newsfeed.speedport.net!naxos.belnet.be!news.belnet.be!bornews.borland.com!dnews!212.1.136.57