Solved

Path from an ODBC Alias

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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 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…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses
Course of the Month6 days, 18 hours left to enroll

622 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