开发者

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?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜