🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.ado
Article #1912

Re: ConnectionString

#1912
From: Vladimir Afanasyev
Date: Fri, 16 Jan 2004 15:42
31 lines
2622 bytes
Hi,

You can use Windows registry for your connection string 
(TRegistry class).
When program starts first time it test that special key 
absent in registry and execute OpenDialog (or another special form). 
From OpenDialog directory path will put in registry. 
Every next run of application will read Registry and get 
information from there.

It's from help:
"Before putting data into the registry, an application should divide the data into two categories: computer-specific data and user-specific data. By making this distinction, an application can support multiple users, and yet locate user-specific data over a network and use that data in different locations, allowing location-independent user profile data. (A user profile is a set of configuration data saved for every user.)

When the application is installed, it should record the computer-specific data under the HKEY_LOCAL_MACHINE key. In particular, it should create keys for the company name, product name, and version number, as shown in the following example: 

HKEY_LOCAL_MACHINE\Software\MyCompany\MyProduct\1.0 
 

If the application supports OLE, it should record that data under HKEY_LOCAL_MACHINE\Software\Classes.
An application should record user-specific data under the HKEY_CURRENT_USER key, as shown in the following example: 

HKEY_CURRENT_USER\Software\MyCompany\MyProduct\1.0\... 
"

At least I did it this way in my FindFunction (non-database) application.
You can download it from codecentral:
source code - http://codecentral.borland.com/codecentral/ccweb.exe/listing?id=18081
exe - http://codecentral.borland.com/codecentral/ccweb.exe/listing?id=18080

Vladimir.
Technical Details
Message-ID: <4008148e@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!news-hog.berkeley.edu!ucberkeley!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <bu8p44$ea1k7$1@ID-215342.news.uni-berlin.de>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,3aba1eaf96bc1326
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2004-01-16 08:51:39 PST
From: "Vladimir Afanasyev" <avv@systema.kiev.ua>
Sender: "Vladimir Afanasyev" <avv@systema.kiev.ua>
Reply-To: "Vladimir Afanasyev" <avv@systema.kiev.ua>
Subject: Re: ConnectionString
Newsgroups: borland.public.cppbuilder.database.ado
X-User-Info: 212.82.216.226     
X-Forwarded-For: 192.168.0.147
References:  <bu8p44$ea1k7$1@ID-215342.news.uni-berlin.de>
NNTP-Posting-Host: 207.105.83.66
Message-ID: <4008148e@newsgroups.borland.com>
Date: 16 Jan 2004 08:42:54 -0700
X-Trace: newsgroups.borland.com 1074271374 207.105.83.66 (16 Jan 2004 08:42:54 -0700)
Lines: 33
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!news-hog.berkeley.edu!ucberkeley!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail