Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

SQL Server connection Error

New Here ,
Nov 15, 2006 Nov 15, 2006

Copy link to clipboard

Copied

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
TOPICS
Server side applications

Views

471
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 15, 2006 Nov 15, 2006

Copy link to clipboard

Copied

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
>
>


Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 15, 2006 Nov 15, 2006

Copy link to clipboard

Copied

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

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 15, 2006 Nov 15, 2006

Copy link to clipboard

Copied

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
>


Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 15, 2006 Nov 15, 2006

Copy link to clipboard

Copied

i got it 😉
thx alot

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 15, 2006 Nov 15, 2006

Copy link to clipboard

Copied

So...what fixed it?


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


Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 15, 2006 Nov 15, 2006

Copy link to clipboard

Copied

yes i did :)
thx again

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 16, 2006 Nov 16, 2006

Copy link to clipboard

Copied

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


Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 16, 2006 Nov 16, 2006

Copy link to clipboard

Copied

LATEST
i did as u told me ( Use both Windows and SQL Authentication).
Cheers

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines