Solved

Path from an ODBC Alias

Posted on 2000-04-04
3
285 Views
Last Modified: 2010-04-04
I want to get the path of my access database connected via ODBC into my application so that I can compact them.  Anyone help?
0
Comment
Question by:dvk
  • 3
3 Comments
 
LVL 2

Accepted Solution

by:
NetoMan earned 100 total points
ID: 2684477
You can get it from your registry windows file. There is some sample on how to get this information :

var
  AppRegistry: TRegistry;
  RegistryPath, FPath: string;

begin

  AppRegistry := TRegistry.Create;
  try
     RegistryPath := '\SOFTWARE\ODBC\ODBC.INI\accesdb';
    AppRegistry.OpenKey(Format('%s', [RegistryPath]),True);
    FPath := AppRegistry.ReadString('DBQ');
  finally
    AppRegistry.Free;
  end;
   

when accesdb is your ODBC Alias
0
 
LVL 2

Expert Comment

by:NetoMan
ID: 2684491
Check also if this path is correct but have to be for your ODBC Instances becuase is standard.

to check use regedit and look for it on HKEY_CURRENT_USER\SOFTWARE\ODBC\ODBC.INI\
0
 
LVL 2

Expert Comment

by:NetoMan
ID: 2687891
does it work ? I sure it Did....

I haved work whit this kind of operations...

If you need some more help...
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

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…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

821 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