Problem sa connection string-om
27.07.2008. u 01:01 · pre 222 meseci
#1
Pokusavam da se konektujem na bazu sledecim kodom o dobijam...
Na liniji sqlConnection.Open(); mi izbaci:
Login failed for user 'sa'. The user is not associated with a trusted SQL Server connection.
Code:
private string connectionString = @"Server=VLADA-PC\SQLEXPRESS;Database=SMSMessages;user id=sa;password=";
private string connectionString = @"Server=VLADA-PC\SQLEXPRESS;Database=SMSMessages;user id=sa;password=";
Code:
try
{
sqlConnection = new SqlConnection ();
sqlConnection.ConnectionString = getConnectionString();
sqlConnection.Open();
}
catch (Exception ex)
{
throw ex;
}
try
{
sqlConnection = new SqlConnection ();
sqlConnection.ConnectionString = getConnectionString();
sqlConnection.Open();
}
catch (Exception ex)
{
throw ex;
}
Na liniji sqlConnection.Open(); mi izbaci:
Login failed for user 'sa'. The user is not associated with a trusted SQL Server connection.