Solved

Login failed for user sa.  Reason:Not associated with a trusted SQL Server Connection

Posted on 2004-09-03
3
213 Views
Last Modified: 2010-04-23
I am trying to write a record to my SQL database and am having trouble connecting to the database with the user sa.  I thought this user had "god" rights to the system.  Here is my code

'Write Writing Objective Info record
            Dim objConnection3 As SqlConnection = New SqlConnection("server=(local);database=FBISD-TAKS;user id=sa;password=password")
            Dim objCommand3 As SqlCommand = New SqlCommand
            objCommand3.Connection = objConnection3


Any help is greatly appreciated.

Thanks
Kenny

0
Comment
Question by:kwh3856
  • 2
3 Comments
 
LVL 37

Accepted Solution

by:
gregoryyoung earned 500 total points
ID: 11976788
you probably have windows integrated security turned on (and not sql server)

in enterprise manager right click the database and select properties ... go to the security tab and set SqlServer and Windows security as opposed to Windows Only
0
 

Author Comment

by:kwh3856
ID: 11976825
Once again.....YOU ROCK!!!!!


Thanks
Kenny
0
 
LVL 37

Expert Comment

by:gregoryyoung
ID: 11976931
nah I just had to figure out the same issue myself once :( took me an hour so I rememberred it :)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

896 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now