Hello everyone,
while working on a application that uses fb embedded, i accidently had a different connection to my db file open and thus fbclient was uanable to lock the db file exclusively for its own purposes. While thats totally fine and obviously a mistake by me, the method that checks wether the db file exists or not actually told ef core that the db file does not exist, which is not true. In the .NET-Provider implementation, there is a method Exists() that will try to open a connection and returns false, if an exception is thrown. I would expect that method to retrun true, if the actual database file exists, but just can not be connected to. Maybe because a different client is connected excluvely on that db.
For my particular case i am now looking explicitly for the excpetion with that error code and probing the db file itself via File.Exists(), but that will certainly not work via network, so i am not sure what, or if we can do something about that on the Provider level. my feelings are, that there might have to be a additional error code returned by fbclient indicating that the db itself exists, but cant be accessed at the moment instead of using the "CreateFile (open)" exception for both cases.
A screenshot of me stepping though the Exists() method is attached, maybe this is helpful.
Regards,
Lars Weber