dbTalk Databases Forums  

error: not associated with a trusted sql server connection

microsoft.public.sqlserver.tools microsoft.public.sqlserver.tools


Discuss error: not associated with a trusted sql server connection in the microsoft.public.sqlserver.tools forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Daniel
 
Posts: n/a

Default error: not associated with a trusted sql server connection - 06-05-2004 , 10:11 AM






I used code in a vb6 application to attach a database to MSDE, but I get an
error that says "Login failed for user 'sa'. Reason: Not associated with a
trusted SQL Server connection." What does that mean? My code looks like
this:


Private Sub Command1_Click()
Dim oSvroot As SQLDMO.SQLServer

Set oSvroot = New SQLDMO.SQLServer
oSvroot.Connect "(local)", "sa", "password"
oSvroot.AttachDB "Sales", "C:\DB\Sales.mdf, C:\DB\Sales.ldf"
oSvroot.DisConnect
Set oSvroot = Nothing
End Sub

Daniel



Reply With Quote
  #2  
Old   
Andrea Montanari
 
Posts: n/a

Default Re: error: not associated with a trusted sql server connection - 06-05-2004 , 10:25 AM






hi Daniel,
"Daniel" <dwbnews (AT) hotmail (DOT) com> ha scritto nel messaggio
news:%23YLYh9wSEHA.4016 (AT) TK2MSFTNGP10 (DOT) phx.gbl...
Quote:
I used code in a vb6 application to attach a database to MSDE, but I get
an
error that says "Login failed for user 'sa'. Reason: Not associated with a
trusted SQL Server connection." What does that mean? My code looks like
this:
.....
MSDE 2000 installs by default only allowing WindowsNT (trusted)
connections... so SQL Server authenticated connections will not be granted
login....
please have a look at
http://support.microsoft.com/default...b;en-us;285097 KB article
for further info on how to modify this setting botha at MSDE install time
and/or after that...
--
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtm http://italy.mvps.org
DbaMgr2k ver 0.7.0 - DbaMgr ver 0.53.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
--------- remove DMO to reply



Reply With Quote
  #3  
Old   
dimitris
 
Posts: n/a

Default Re: error: not associated with a trusted sql server connection - 06-07-2004 , 02:01 AM




"Daniel" <dwbnews (AT) hotmail (DOT) com> wrote

Quote:
I used code in a vb6 application to attach a database to MSDE, but I get
an
error that says "Login failed for user 'sa'. Reason: Not associated with a
trusted SQL Server connection." What does that mean? My code looks like
this:


Private Sub Command1_Click()
Dim oSvroot As SQLDMO.SQLServer

Set oSvroot = New SQLDMO.SQLServer
oSvroot.Connect "(local)", "sa", "password"
oSvroot.AttachDB "Sales", "C:\DB\Sales.mdf, C:\DB\Sales.ldf"
oSvroot.DisConnect
Set oSvroot = Nothing
End Sub

Daniel





Reply With Quote
  #4  
Old   
Rand Boyd [MSFT]
 
Posts: n/a

Default RE: error: not associated with a trusted sql server connection - 06-07-2004 , 09:28 AM



It appears that SQL Server is configured to only allow NT authenticated
connections. You cna change this by lloking on the Security tab under
Properties of the SQL Server in Enterprise Manager. After you make this
change you will need to stop and start SQL Server.

Rand

This posting is provided "as is" with no warranties and confers no rights.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.