Solved

Programmatic Merge .cfg files

Posted on 1998-07-27
4
367 Views
Last Modified: 2010-04-03
How do I programmatically merge a .cfg file into the current idapi32.cfg file?
0
Comment
Question by:chrismo
[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
  • 3
4 Comments
 
LVL 10

Expert Comment

by:viktornet
ID: 1358756
I'm sorry, but can someone tell me what's a .cfg file, and what is it used for? Some part of a help file???? :)

Viktor Ivanov
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1358757
Hi viktornet, I believe it's the configuration file of the BDE in which all the aliases etc are stored. Zif.
0
 
LVL 8

Accepted Solution

by:
ZifNab earned 90 total points
ID: 1358758
Hi chrismo,

look at the examples Inprise itself proposes :

http://www.inprise.com/devsupport/bde/bdeapiex/dbiopencfginfolist.html

Regards, Zif.
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1358759
Look also at BDE32.hlp!

to add a drive : function DbiAddDriver (hCfg: hDBICfg; pszDriverName: PChar; pszParams: PChar; bPersist: Bool): DBIResult stdcall;

to add an alias :

Delphi Examples: DbiAddAlias

Example 1: Add a STANDARD database alias to the configuration file.

This example uses the following input:
      fDbiAddAlias1('TestAlias', 'PATH:C:\BDE32\EXAMPLES\TABLES');

procedure fDbiAddAlias1(AliasName, AliasPath: String);
begin
  Check(DbiAddAlias(Nil, PChar(AliasName), Nil, PChar(AliasPath), True));
end;

Example 2: Add an InterBase database alias to the configuration file.

This example uses the following input:

fDbiAddAlias2('RemoteAlias', 'PATH:frobosrv:d:/interbas;' +
              'SERVER NAME:frobosrv:d:/interbas/slim.gdb;' +
              'USER NAME:test;' +
              'SQLQRYMODE:SERVER;' +
              'SQLPASSTHRU MODE:SHARED NOAUTOCOMMIT');

Note: The last parameter in the string does not have a semicolon ( ; ) at the end.

procedure fDbiAddAlias2(AliasName, AliasPath: String);
begin
  Check(DbiAddAlias(Nil, PChar(AliasName), 'INTRBASE', PChar(AliasPath), True));
end;

Zif.
0

Featured Post

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

763 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