Information générale
Catégorie:
Bases de données
Titre:
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
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement