Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Not associated with a trusted SQL Server connectio

Author  Topic 

shan1430
Yak Posting Veteran

86 Posts

Posted - 2008-03-05 : 21:27:43
Hi,
I have created a login for sphang1-desk server. But when I use the following command in my visual studio, the error as subject appears. what should i do?

Dim connectionString As String = "server=SPHANG1-DESK;User id=GAR\sprakasa;password='';database=Northwind"

thank you

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2008-03-05 : 23:32:44
Did you add GAR\sprakasa as sql login on the server? If so, you have to specify windows authentication in connection string.
Go to Top of Page

shan1430
Yak Posting Veteran

86 Posts

Posted - 2008-03-06 : 01:55:24
can you tell me where should I add the windows authentication code? thank you.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-03-06 : 01:59:41
Use a trusted connection: http://www.connectionstrings.com/?carrier=sqlserver

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

shan1430
Yak Posting Veteran

86 Posts

Posted - 2008-03-06 : 03:01:00
It says cannot find user aspnet. how?
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-03-06 : 13:20:36
Is this for a web site then? If so, you can either add the ASPNET account to the SQL Server or configure the site to use a different account.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

shan1430
Yak Posting Veteran

86 Posts

Posted - 2008-03-06 : 23:33:00
there is an account called ASPNET in SQL Server.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-03-07 : 00:44:42
Please post the exact error and also your new connection string.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/
Go to Top of Page
   

- Advertisement -