General information
Title:
Not associated with a trusted Sql Server connection.
Hi
I add manually a database "Test" and created a table "TableTest" with Server Explorer
in the same SQL Server instance [COMPUTERNAME] that database "master"
// C# sample
private void buttonConnect_Click(object sender, System.EventArgs e)
{
string sConnection = "Data Source =(local);Initial Catalog =TEST" +
"User Id=Owner ;Password=" ;
System.Data.SqlClient.SqlConnection oCon
= new System.Data.SqlClient.SqlConnection(sConnection) ;
try
{
oCon.Open();
}
catch(Exception eExc)
{
MessageBox.Show( eExc.ToString() ) ;
}
finally {
MessageBox.Show("Can't open connection","Form1 message error") ;
}
}
When my application run this method I have the next error message
error:
System.Data.sqllient.SqlException: Login failed for use 'Owner'.
Reason : Not associated with a trusted Sql Server connection.
Used SQL Server login "use Window NT Intregrated Security " option
using : XP Home, Data MSDE , Visual Studio .net and C#
How can I solve this simple problem ?
Thanks You
Roger
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only