Board index » delphi » setting BDE config by software...

setting BDE config by software...

Hello, I am new in this newsgroup. I was having troubles trying to modify
some
initialization values of the BDE working with Delphi3.
I need put the 'Local share' property at TRUE and overwrite the default
value
configurated in the BDE Admin (usually false).

I was trying with a code like that:

Check(DbiGetSysConfig(SysConfigInfo));
if SysConfigInfo.bLocalShare = False then
begin
    Check(DbiOpenCfgInfoList (nil, dbiREADWRITE, cfgPersistent,
'\system\init\', cfgCursor));
    fnd := false;
    lastError := 0;
    while ( (not fnd) and (lastError=0) ) do
    begin
        lastError := DbiGetNextRecord (cfgCursor, dbiNOLOCK, @cfgStruct,
nil);
        fnd := cfgStruct.szNodeName = 'LOCAL SHARE';
    end;
    if lastError<>0 then Exit; // something wrong...
    cfgStruct.szValue := 'TRUE';
    Check(DbiModifyRecord (cfgCursor, @cfgStruct, True));
    Check(DbiCloseCursor (cfgCursor));

    ...

this code don't raise any error but seems have no effect at all....
if someone know how to ... Please post me something into [email protected]
or
[email protected]

Thanks!

 

Re:setting BDE config by software...


On Wed, 25 Aug 1999 11:36:04 +0200, "Patrick Van Ginkel"

Quote
<[email protected]> wrote:
>        fnd := cfgStruct.szNodeName = 'LOCAL SHARE';

        fnd := (StrIComp(cfgStruct.szNodeName, 'LOCAL SHARE') = 0);

Quote
>    cfgStruct.szValue := 'TRUE';

        StrCopy(cfgStruct.szValue, 'TRUE');

Jan

Other Threads