ODBCConnection how to prompt for user+pass when having a DSN

  • Thread starter Thread starter roundcrisis
  • Start date Start date
R

roundcrisis

That is the whole question
I have a lsit of DSN availables and to use these for an ODBC
connection I would mostly need to prompt for username and password,
how can i do this?
Thanks
 
You could always create a form with a username field and a password
field and then get the username/password from the user and construct your
connection string based on that.

Or are you looking for a specific dialog that ODBC uses? If so, then
you might have to call the methods in ODBC directly through the P/Invoke
layer.
 
You could always create a form with a username field and a password
field and then get the username/password from the user and construct your
connection string based on that.

Or are you looking for a specific dialog that ODBC uses? If so, then
you might have to call the methods in ODBC directly through the P/Invoke
layer.

--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)




That is the whole question
I have a lsit of DSN availables and to use these for an ODBC
connection I would mostly need to prompt for username and password,
how can i do this?
Thanks- Hide quoted text -

- Show quoted text -

hi thanks a million for your answer,
I m afraid I m not familiar with P/Invoke
I would like to prompt really for any missing parameters depending on
the type of dsn driver
do you know where can i get more info on this topic?
Thanks
 
Do you know if ODBC offers this kind of configuration already? If not,
you will have to create it yourself.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

roundcrisis said:
You could always create a form with a username field and a password
field and then get the username/password from the user and construct your
connection string based on that.

Or are you looking for a specific dialog that ODBC uses? If so, then
you might have to call the methods in ODBC directly through the P/Invoke
layer.

--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)




That is the whole question
I have a lsit of DSN availables and to use these for an ODBC
connection I would mostly need to prompt for username and password,
how can i do this?
Thanks- Hide quoted text -

- Show quoted text -

hi thanks a million for your answer,
I m afraid I m not familiar with P/Invoke
I would like to prompt really for any missing parameters depending on
the type of dsn driver
do you know where can i get more info on this topic?
Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top