Solved

Programmatic Merge .cfg files

Posted on 1998-07-27
4
371 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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

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…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

688 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