Re: Finding Out DSN Selected by User
- From: "Bob Barrows [MVP]" <reb01501@xxxxxxxxxxxxxxx>
- Date: Wed, 20 Dec 2006 13:26:34 -0500
Alok wrote:
Thanks Bob,
I was trying to avoid parsing of the Connection String. Is it
possible to get the DSN without parsing?
Not that I know of. it's not hard to parse it though:
dim sConnect, ar1, ars, sDSN
sConnect = con.connectionstring
ar1=Split(sConnect, "Data Source")
ar2=Split(ar1(1), ";")
sDSN=mid(ar2(0),2)
using a regex would be a little easier.
I was hoping to use the DataSo why do you need the name of the DSN?
Source Name property of the connection object but that does not work
- at least when I select a DSN which is to an Access database.
Incidentally I am doing this so that I can write a generic program so
that the user can look at the data in any of the databases for which
a DSN is set up on the computer.
Alok
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
.
- References:
- Re: Finding Out DSN Selected by User
- From: Bob Barrows [MVP]
- Re: Finding Out DSN Selected by User
- Prev by Date: Re: Finding Out DSN Selected by User
- Next by Date: Re: prepared sql statements
- Previous by thread: Re: Finding Out DSN Selected by User
- Next by thread: Connection Leak.
- Index(es):
Relevant Pages
|
|