Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to make SQL Connection String Revert to Mixed-Mode Security? 2

Status
Not open for further replies.

ryansupak

MIS
Jul 23, 2002
39
US
Hi, I'm trying to write an SQL connection string into a third-party application.

The SQL database I'm attempting to connect to uses mixed-mode security, and I do not have access to any actual SQL passwords.

I'm currently trying to use something like:

"server=TheServer;database=TheDatabase;uid=WindowsUser;pwd=WindowsUserPassword;"

...but it won't authenticate.

So, I need to somehow flag it, I suppose, to revert to mixed-mode security.

I'm imagining adding something like

"UseMixedMode = true"

but I just don't know the syntax.

Any help is appreciated!
rs
 
try:
Integrated Security=SSPI;user id=yourwindowsuser;Persist Security Info=True;Initial Catalog=yourdatabase;Data Source=yourServer
 
Hi,

When using SQL server mixed mode security you can login either through sql server username & password OR by Windows NT integrated security. Since you dont have any SQL server logins/passwords you have to use integrated security (which is fine!). You connection string could look like:
------------------------------------------------------
Private ConnStr As String = "Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=yourdatabase;Data Source=yourServer"
------------------------------------------------------
There is normally no need to persist security info and you do not want to give a user id (that is given through the integrated security, e.i. the windows user name)

Sunaj
'The gap between theory and practice is not as wide in theory as it is in practice'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top