How To Invoke a Login Prompt When Opening an ADO.Net Connection ?

G

Guest

Hi :

Does someone know if there is a way to throw a login prompt in ADO.Net
similar to the ADO connection login prompt as below :

Dim cn as ADODB.Connection
Set cn = New ADODB.Connection
With cn
.Properties("Prompt") = adPromptAlways
.Open
End With

Thanks much in advance.
 
S

Sahil Malik [MVP C#]

You would have to implement this in code yourself and modify the appropriate
connection string - there is no direct way as you suggest below.
And in fact, when moving from ADOc to ADO.NET - is a whole new way of
thinking, unless you have a very very specific scenario, most business apps
shouldn't prompt for a login box as below.

- Sahil Malik [MVP]
ADO.NET 2.0 book -
http://codebetter.com/blogs/sahil.malik/archive/2005/05/13/63199.aspx
__________________________________________________________
 
G

Guest

Hi:

Thank you for replying to this Q. Sure, I do understand that ADO->ADO.Net is
a completely new architecture. But, I do have a requirement for that kind of
authentication and avoid creating a seperate login page or use the
Trusted(Yes/No) connection string in .config file even with encryption. The
con.Properties("Prompt") was a cool thing in ADO and no explicit userid/pwd
needed to be passed to the connection string by the developer.
--
Thanks,
SDRoy


Sahil Malik said:
You would have to implement this in code yourself and modify the appropriate
connection string - there is no direct way as you suggest below.
And in fact, when moving from ADOc to ADO.NET - is a whole new way of
thinking, unless you have a very very specific scenario, most business apps
shouldn't prompt for a login box as below.

- Sahil Malik [MVP]
ADO.NET 2.0 book -
http://codebetter.com/blogs/sahil.malik/archive/2005/05/13/63199.aspx
__________________________________________________________
 

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

Top