Home All Groups Group Topic Archive Search About

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

Author
2 Mar 2006 12:03 AM
SDRoy
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.
--
Thanks,
SDRoy

Author
2 Mar 2006 3:36 AM
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
__________________________________________________________


Show quote
"SDRoy" <SD***@discussions.microsoft.com> wrote in message
news:100706BA-F20A-4B41-9F27-ED6312785A45@microsoft.com...
> 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.
> --
> Thanks,
> SDRoy
Author
2 Mar 2006 6:17 AM
SDRoy
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


Show quote
"Sahil Malik [MVP C#]" wrote:

> 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
> __________________________________________________________
>
>
> "SDRoy" <SD***@discussions.microsoft.com> wrote in message
> news:100706BA-F20A-4B41-9F27-ED6312785A45@microsoft.com...
> > 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.
> > --
> > Thanks,
> > SDRoy
>
>
>

AddThis Social Bookmark Button