Once the user had designated the new install location for the
executables and sent them there, the install script would call an
external exe to set NETDIR.
I program in Paradox, so this is a bit obtuse for me.
Can anyone help with an existing scrap of code?
John Beukema
To set BDE parameters with Wise 6.01 and later add the following to the
parameters for any alias that is created.
\SYSTEM\INIT\LOCAL SHARE: TRUE
\DRIVERS\PARADOX\INIT\NET DIR: %MAINDIR%\BDENET
--
Bill
var
hCur : hDBICur;
Config : CFGDesc;
ContinueIt: boolean;
...
if DbiInit(nil) = DBIERR_NONE then
begin
hCur := nil;
if DbiOpenCfgInfoList(nil, dbiREADWRITE, cfgPersistent,
'\\DRIVERS\\PARADOX\\INIT', hCur) = DBIERR_NONE then
begin
if DbiSetToBegin(hCur) = DBIERR_NONE then
begin
ContinueIt := true;
while ContinueIt do
begin
if(DbiGetNextRecord(hCur, dbiWRITELOCK, @Config, nil)
<> DBIERR_NONE) then
ContinueIt := false
else
if StrIComp(Config.szNodeName, 'NET DIR') = 0 then
begin
StrCopy(Config.szValue, 'servervolumemydir');
DbiModifyRecord(hCur, @Config, true);
ContinueIt := false
end;
end;
end;
end;
DbiExit();
end;
--
Bill
John B.
On Sun, 18 Feb 2001 10:52:35 -0700, "Bill Todd \(TeamB\)"
<billt...@nospam.qwest.net> , in borland.public.bde, wrote:
>You must add the BDE unit to the uses clause in the unit that contains the
>code.
Ditch the Attitude to respond
program Project1;
uses Messages, SysUtils, Dialogs, BDE, dbtables, classes;
{$APPTYPE CONSOLE}
var
slDriverParams: TStringList;
begin
slDriverParams := nil;
try
slDriverParams := TStringList.Create;
slDriverParams.Values['NET DIR'] := 'servervolumemydir';
Session.ModifyDriver('PARADOX', slDriverParams);
Session.SaveConfigFile;
finally
slDriverParams.Free;
end;
end.
========================================
It works perfectly but is a bit fatter than the straight BDE API
coding (about 463K). I found that the bit of code I was using only
wrote to the CFG file. it did nothing to open it or reveal its
structure and data, So Mr. Lichti's code is now in production, with
some additions to read a command-line parameter and show some
procedural commentary in the program window.
Thanks to all!
John Beukema
On Sun, 18 Feb 2001 10:52:35 -0700, "Bill Todd \(TeamB\)"
<billt...@nospam.qwest.net> , in borland.public.bde, wrote:
>You must add the BDE unit to the uses clause in the unit that contains the
>code.
Lose the Attitude to respond
Essentially, the entire CFG file contents are located here in the
registry. When a BDE session begins, does it get all or part of its
values from the registry, or from the file, or refresh the registry
from the file, or what?
On Sun, 18 Feb 2001 10:52:35 -0700, "Bill Todd \(TeamB\)"
<billt...@nospam.qwest.net> , in borland.public.bde, wrote:
>You must add the BDE unit to the uses clause in the unit that contains the
>code.
Lose the Attitude to respond
--
Bill
One more question if I may: I am attempting to compile Example 3 from
http://www.inprise.com/devsupport/bde/bdeapiex/dbiopencfginfolist.html
and the compiler is sticking on a pByte dataType. I am using BDE,
Messages, Classes,sysUtils; in my header but it still chokes. Is there
an additional library or DLL I should be using to import a pByte
definition?
On Tue, 20 Feb 2001 16:35:55 -0700, "Bill Todd \(TeamB\)"
<billt...@nospam.qwest.net> , in borland.public.bde, wrote:
Lose the Attitude to respond
--
Bill
Thanks a lot for your help with this. I have learned a lot more than I
thought I needed to know about this project. It will stand me in good
stead for the future.
On Wed, 21 Feb 2001 14:38:58 -0700, "Bill Todd \(TeamB\)"
<billt...@nospam.qwest.net> , in borland.public.bde, wrote:
>PByte is declared in the Windows unit.
Lose the Attitude to respond