Skip to main content
Known Participant
November 15, 2006
Question

SQL Server connection Error

  • November 15, 2006
  • 8 replies
  • 512 views
Hello
I'm try to connect to a SQL database , well the code line of the connection is :

Bcon = New sqlConnection("data source=LABG;uid=sa;pwd=;initial catalog=db_Personal")

when i try to open the connection, Dcon.open(), i got the following error :

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

so can anyone helps me solving this problem?
thx alot
This topic has been closed for replies.

8 replies

Feras_86Author
Known Participant
November 16, 2006
i did as u told me ( Use both Windows and SQL Authentication).
Cheers
Inspiring
November 16, 2006
So others can learn, what did you do to resolve the problem?



"Feras_86" <webforumsuser@macromedia.com> wrote in message
news:ejgp17$fn0$1@forums.macromedia.com...
> yes i did :)
> thx again


Feras_86Author
Known Participant
November 16, 2006
yes i did :)
thx again
Inspiring
November 16, 2006
So...what fixed it?


"Feras_86" <webforumsuser@macromedia.com> wrote in message
news:ejghn0$8jv$1@forums.macromedia.com...
>i got it ;)
> thx alot


Feras_86Author
Known Participant
November 16, 2006
i got it ;)
thx alot
Inspiring
November 16, 2006
Try this:

a.. Open The SQL Server Enterprise Manager
Start menu > Programs > Microsoft SQL Server > Enterprise Manager)
b.. Expand the tree-control until you can your server
c.. Right click on the server name and "SQL Server Properties (Configure)"
window will open
d.. Select the Security tab
e.. For "Authentication", select "SQL Server and Windows"

"Feras_86" <webforumsuser@macromedia.com> wrote in message
news:ejg95i$t2f$1@forums.macromedia.com...
> ok
> i've changed the connection string :
> Bcon = New sqlConnection("data source=LABG;uid=Feras;pwd=1111;initial
> catalog=gsmlanka")
>
> anad i still get the same error :
>
> Login failed for user 'Feras'. Reason: Not associated with a trusted SQL
> Server connection.
>
> thx
>


Feras_86Author
Known Participant
November 15, 2006
ok
i've changed the connection string :
Bcon = New sqlConnection("data source=LABG;uid=Feras;pwd=1111;initial catalog=db_Personal")

anad i still get the same error :

Login failed for user 'Feras'. Reason: Not associated with a trusted SQL Server connection.

thx
Inspiring
November 15, 2006
Two things:

- I don't see were you entered a password for the SA account

- More importantly...NEVER EVER use the SA account for a SQL connection, you
should create a new user.


"Feras_86" <webforumsuser@macromedia.com> wrote in message
news:ejerhp$6ge$1@forums.macromedia.com...
> Hello
> I'm try to connect to a SQL database , well the code line of the
> connection is
> :
>
> Bcon = New sqlConnection("data source=LABG;uid=sa;pwd=;initial
> catalog=db_Personal")
>
> when i try to open the connection, Dcon.open(), i got the following error
> :
>
> Login failed for user 'sa'. Reason: Not associated with a trusted SQL
> Server
> connection.
>
> so can anyone helps me solving this problem?
> thx alot
>
>