Not able to connect to SQLite database if share is hidden
-
When I use the connection string ‘\\\\network\share\file.db’ it works fine. But if the share is hidden the SQLite database can not be found. I use the connectionstring as follows: Con As New SQLite.SQLiteConnection With {.ConnectionString = "Data Source=\\\\network\share\file.db;Version=3;"} The \\\\ is according this article: unable to open database file on a local network
-
When I use the connection string ‘\\\\network\share\file.db’ it works fine. But if the share is hidden the SQLite database can not be found. I use the connectionstring as follows: Con As New SQLite.SQLiteConnection With {.ConnectionString = "Data Source=\\\\network\share\file.db;Version=3;"} The \\\\ is according this article: unable to open database file on a local network
If the user running the code doesn't have read and write permissions to share and to the folder the database is in, it's not going to open. There is no such thing as a "hidden"(*) share. You either have permissions to use it or you don't. * There are admin shares, where the name ends in a $, but you need admin permissions to see them. Normal users will never know they exist.
Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles.
Dave Kreskowiak -
When I use the connection string ‘\\\\network\share\file.db’ it works fine. But if the share is hidden the SQLite database can not be found. I use the connectionstring as follows: Con As New SQLite.SQLiteConnection With {.ConnectionString = "Data Source=\\\\network\share\file.db;Version=3;"} The \\\\ is according this article: unable to open database file on a local network
@"\\network\share\file.db" or "\\\\network\\share\\file.db" ..but what Mish answered, won't work :)
Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^] "If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.