?
Solved

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

Posted on 2004-09-03
3
Medium Priority
?
224 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 2000 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

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

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

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Screencast - Getting to Know the Pipeline
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…

850 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