Re: Finding Out DSN Selected by User
- From: "Bob Barrows [MVP]" <reb01501@xxxxxxxxxxxxxxx>
- Date: Wed, 20 Dec 2006 12:30:04 -0500
Alok wrote:
Gurus I need some help with ADO.I've never done this (allowed users to select the DSN) but I suspect you
I have an application where I use the following commands to invoke
the DSN dialog box so that user can select the appropriate DSN.
Dim con as new ADODB.Connection
con.ConnectionString = ""
con.Properties("Prompt").value = adPromptAlways
con.Open
Once the connection is open how can I find out the name of the DSN
that the user selected.
can find out by checking the connection's ConnectionString property
after the connection is open.
You might want to consider an alternative approach:
prompt the user to select a database/server from a pre-defined list to
connect to instead of a DSN, and use the selection to build a DSNless
connection string instead of using a DSN
(http://www.aspfaq.com/show.asp?id=2126)
--
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.
.
- Prev by Date: Re: Why use Connection.Close in ADO?
- Next by Date: Re: Finding Out DSN Selected by User
- Previous by thread: Re: Why use Connection.Close in ADO?
- Next by thread: Re: Finding Out DSN Selected by User
- Index(es):
Relevant Pages
|
Loading