Solved

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

Posted on 2004-09-03
3
212 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
Comment Utility
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
Comment Utility
Once again.....YOU ROCK!!!!!


Thanks
Kenny
0
 
LVL 37

Expert Comment

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

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

743 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

8 Experts available now in Live!

Get 1:1 Help Now