Solved

ADO connection with Windows Authentication

Posted on 2004-04-20
3
560 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
  • 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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SQL Server Designer 19 42
Querying data from 3 SQL tables 2 32
CPU high usage when update statistics 2 30
How to create a unique rule restriction on a table for two fields 16 83
Nowadays, some of developer are too much worried about data. Who is using data, who is updating it etc. etc. Because, data is more costlier in term of money and information. So security of data is focusing concern in days. Lets' understand the Au…
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties

777 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