Solved

PARADOX NET DIR

Posted on 1998-08-31
2
777 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
2 Comments
 
LVL 5

Accepted Solution

by:
ronit051397 earned 50 total points
Comment Utility
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
Comment Utility
TNQ for the fast answer......

0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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 this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

762 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now