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

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.


Who is Participating?
gregoryyoungConnect With a Mentor Commented:
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
kwh3856Author Commented:
Once again.....YOU ROCK!!!!!

nah I just had to figure out the same issue myself once :( took me an hour so I rememberred it :)
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.