Invalid authorization specification error using FILEDSN on OleDBConnection

55 views Asked by At

I was trying to compile the simple following program but it throws the error "Invalid authorization specification". I searched google for it and there is nothing may be someone can give me a hint on how to debug this.

  OleDbConnection con = new OleDbConnection();
  con.ConnectionString = "Provider=MSOLEDBSQL;FILEDSN=C:\\Path\\to\\my\\file.dsn";
  con.Open();

the file is in the right location and it is generated automatically by the tools given by microsoft. I got the same error ever if the location of the file is wrong. Also, when using "Data Source" instead of "FILEDSN" it works as expected. I am using Windows authentication.

0

There are 0 answers