Solved

PARADOX NET DIR

Posted on 1998-08-31
2
791 Views
Last Modified: 2008-02-01
Hi All
I'm trying to set the "NET DIR" property in the paradox driver of the BDE by using the "DbiGetNextRecord" and "DbiModifyRecord" functions (i can give the code if you need it} and though i'm getting OK results from both function i end up with trush in the "NET DIR" field.
If anyone have a source they can show me this will realy help.
TNQ
0
Comment
Question by:dotan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 5

Accepted Solution

by:
ronit051397 earned 50 total points
ID: 1338182
To change the NET DIR to c:\temp write:

SetConfigParameter('\DRIVERS\PARADOX\INIT\;NET DIR','c:\temp');

procedure SetConfigParameter(Param: string; Value: string);
var
  hCur: hDBICur;
  rslt: DBIResult;
  Config: CFGDesc;
  Path, Option: string;
  Found: boolean;
  Temp: array[0..255] of char;
begin
  hCur := nil;
  Found := False;
  try
        Check(dbiInit(Nil));
    if Pos(';', Param) = 0 then
      raise EDatabaseError.Create('Invalid parameter passed to function.  There must ' +
        'be a semi-colon delimited sting passed');
    Path := Copy(Param, 0, Pos(';', Param) - 1);
    Option := Copy(Param, Pos(';', Param) + 1, Length(Param) - Pos(';', Param));
    Check(DbiOpenCfgInfoList(nil, dbiREADWRITE, cfgPERSISTENT, StrPCopy(Temp, Path), hCur));
    repeat
      rslt := DbiGetNextRecord(hCur, dbiNOLOCK, @Config, nil);
      if rslt = DBIERR_NONE then
      begin
        if StrPas(Config.szNodeName) = Option then
        begin
          StrPCopy(Config.szValue, Value);
          Check(DbiModifyRecord(hCur, @Config, FALSE));
          Found := True;
          break;
        end;
      end
      else
      if rslt <> DBIERR_EOF then Check(rslt);
    until rslt <> DBIERR_NONE;
    if Found = False then
      raise EDatabaseError.Create(Param + ' entry was not found in configuration file');
  finally
    if hCur <> nil then Check(DbiCloseCursor(hCur));
    DbiExit;
  end;
end;

0
 

Author Comment

by:dotan
ID: 1338183
TNQ for the fast answer......

0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Delphi selector screen 2 97
Dev express lookupcombo 3 64
update joined tables 2 74
PHP preg_replace code convert to Delphi 14 98
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question