Solved

Path from an ODBC Alias

Posted on 2000-04-04
3
287 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

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…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

860 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