SQL Authentication passing user Id and password.

Topics: Data Access Application Block
Feb 2, 2009 at 11:56 AM

Despite of searching, i am not been able to find a way to create a Database object used in Enterprise Library using SQL Authentication.

I want to show the form for user id and password to user and then pass the credentials to the connection string.

I will appreciate if i could get a chance to see the code to achieve this.


Nitin Sontakke.
Feb 2, 2009 at 12:07 PM
I believe DAAB doesn't directly supports this.  What you could do is to create your own custom Database provider class and have a facility there for adding username and password as part of the connection string.  A sample was posted here.. http://www.codeplex.com/entlib/Thread/View.aspx?ThreadId=42826

Sarah Urmeneta
Global Technology & Solution
Avanade, Inc.