I'm trying to access a SQL database that is set up on a
Windows 2003 Enterprise machine on my network through my
VB.NET app.
I started with the following simple code just to make sure
I could access the database:
Dim ConnectionString As String
ConnectionString = "Password=" & DBPassword
& ";User ID=" & DBUsername & ";" & "Initial Catalog=" &
DBName & ";Data Source=" & DBServerHostname & ";"
Dim DBConn As New SqlClient.SqlConnection
(ConnectionString)
DBConn.Open()
I verified that everything was correct in the connection
string, etc., but I was getting SQL access errors, so I
decided to try to add a Data Connection in the Server
Explorer.
I can successfully add the server to the Server Explorer
and can access everything (e.g. event logs, performance
counters, services, etc.). When I open the "SQL Servers"
item and click on the item underneath, a dialog pops up
asking for the username and password for the database.
Even if I enter the correct info, I get an error
stating "Login failed for user '(username)'. Reason: Not
associated with a trusted SQL Server connection.
What does that mean and how can I fix it?
I've had some experience writing and modifying existing
things like stored procs for existing databases but have
not worked before with creating a new database from
scratch and doing all this. Below is what I did, just to
make sure I didn't do anything wrong on the SQL server:
-Created new database under 'local' under 'Microsoft SQL
Servers'
-Added new user to database with dbo rights
(authentication not based on Windows Authentication)
-Added new table to database
-Added columns to table (one is primary key)
Is there anything I missed there?
Thanks
Dino Chiesa [MSFT] - 29 Aug 2003 18:10 GMT
May I suggest...?
http://support.microsoft.com/default.aspx?scid=kb;en-us;307002
and
http://www.google.com/search?hl=en&num=30&q="Not+associated+with+a+trusted"
-Dino
> I'm trying to access a SQL database that is set up on a
> Windows 2003 Enterprise machine on my network through my
[quoted text clipped - 43 lines]
>
> Thanks