There are 2 Access databases, and user chooses to which database to connect to. Now, When connected to database1, everyting works well. When connected to database2, I get following exception:
c:\SomePreviousDatabasePath\database2.mdb is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides.
Now, the message is very precise, but the problem is I dont use this path anywhere in connection string. What is even more strange, the connection opens without any errors.
myCommand.Connection.Open(); // no exception raised here
OleDbDataReader dr = myCommand.ExecuteReader(); // this line throws exception
MyCommand.CommandText doesnt have any database pats in it, just a reguler SELECT somefields FROM tableName WHERE some condition
Has anyone had this problem before?