Solved

ADO connection with Windows Authentication

Posted on 2004-04-20
3
578 Views
Last Modified: 2012-06-27
Hi,

I want to establish a secure connection with ADO to a SQL server, but I want to do it with alternate credentials (ie not the account I am logged on with).  I am using VB to create an application, and I'm using the following connection string:

"Trusted_Connection=Yes;Driver={SQL Server};Server=" & _
        strSQLServer & ";Database=" & strDatabase & ";User Id=" & _
        strSQLUser & ";Password=" & strSQLPassword

It seems to ignore the User ID and Password, and use my currently logged on credentials.

Thanks for the help.
0
Comment
Question by:ojfahoum
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 34

Accepted Solution

by:
arbert earned 500 total points
ID: 10870930
You cannot use TRUSTED CONNECTION if you want to supply userid/passord.  The SQL Server must also be setup to allow SQL Authentication.
0
 

Author Comment

by:ojfahoum
ID: 10870942
Is there a way to encrypt the username and password over SQL Authentication?
0
 
LVL 34

Expert Comment

by:arbert
ID: 10871012
Only if you enable the "Force Protocol Encryption":

http://www.mcse.ms/archive97-2003-12-144373.html
0

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

622 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question