[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Programmatic Merge .cfg files

Posted on 1998-07-27
4
Medium Priority
?
374 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 360 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

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

649 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