HELP: ODBC function to return database name and path from DataSoure Name 
Author Message
 HELP: ODBC function to return database name and path from DataSoure Name

Quote:

> Hi all,
>     I would like to know if there is a function or an easy way to retrive
> the Database Name and Path when you know the given configured ODBC Data
> Source name.  For example, I if have a Data Source name EmployeeDB
> configured in ODBC32 in the Control Panel, how can I figure out the database
> name and path?  This could be an Access, Excel, etc data source.  Thanks for
> all your help.

You may be able to retrieve the database name (after connecting to the data source)
using SQLGetInfo(SQL_DATABASE_NAME), but the value returned is entirely dependent on the
individual ODBC driver. There is no standard way to retrieve path information in ODBC.
Probably, you will need to look through the registry to get this information. The format
of the path information will vary for each driver.

--
Lee Fe{*filter*}an, FFE Software, Inc. ( http://www.***.com/ )



Sat, 30 Sep 2000 03:00:00 GMT
 
 [ 1 post ] 

 Relevant Pages 

1. Return Registerd SQL Server Name and Databases name??

2. Returning SQL Server Name in my Company and Database name

3. Database path and name for a database object

4. Getting Long File Path from short Path / File Name

5. Returning table names and field names?

6. Return values (stored functions) and named parameters

7. function that returns the name of Month?

8. function returning name of current sp or trigger??

9. Global Database Name, Database Name, and SID

10. Calling table functions using named notation returns ORA-00907 (Oracle 9i)

11. How to store database trigger programs with relativ path name

12. Picking up path name of Access Database


 
Powered by phpBB® Forum Software