|
-
February 19th, 1999, 03:41 AM
#1
extracting databasename from the configured dsn
For a particular dsn how to extract the database name with path to which it is
configured.(Access database)?
-
November 22nd, 2001, 03:56 AM
#2
Re: extracting databasename from the configured dsn
If you kindly tell me what excatly you want. I think I can help you out...
By giving configured DSN name you can get the the path of the database..using a library function
regards
-
November 27th, 2001, 10:00 AM
#3
Re: extracting databasename from the configured dsn
Hi,
If you are talking about a .dsn file, it is easy.
You can access .dsn file like a INI file using the corresponding API's.
Below an example:
Dim Ret as string, NC as Long
'Create a buffer
Ret = string(255, 0)
'Retrieve the string
NC = GetPrivateProfileString("ODBC", "DBQ", "Default", Ret, 255, "C:\test.dsn")
'NC is the number of characters copied to the buffer
If NC <> 0 then Ret = Left$(Ret, NC)
'Show our string
MsgBox Ret
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|