How to properly use the connection string?
my application is crashing when using this connection string:
protected string connectionString = @"Server=ricardo-pc\ricardo;Database=INSTANCIA_OBLI;Trusted_Connection=True;Provider=SQLOLEDB;";
it crashes at the open()
function
OleDbConnection conexion = new OleDbConnection(connectionString);
conexion.Open();
the error i开发者_如何学Pythons that the authorization is not valid...
before using trusted connection = True
it complained about DNETLIB and that the server was not found..."
Are you able to connect to that database using SQL Management Studio (from the machine where this code is crashing) - using a trusted connection?
精彩评论