System.Data.SQLite.SQLiteException Attempt to write a read-only database on Windows 8
I don't know what is the current directory at the instant of your call, but I would be sure to put my database in a folder where every user have read/write permission by design.
Why don't use the folders represented by the Environment.SpecialFolder enum?
You could change your code to something like this
Try Dim appFolder = Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) appFolder = Path.Combine(appFolder, "MyAppDatabaseFolder") If Not Directory.Exists(appFolder) Then Directory.CreateDirectory(appFolder) End If Dim myDB = Path.Combine(appFolder, "MY_DB.db") If (Not File.Exists(myDB)) Then ..... End If Catch ex As Exception 'Throw ex Return False End Try