I want my users not to be able to see the MS Access *.accdb Database I am using. Therefore would I like to embed it into the assembly. How should I do this?
My guess is to modify the connection string.
The connection to the database has been automatically made with the import wizard. The connection string can be found in the file Settings.Designer.vb
and has been written like this:
Global.System.Configuration.ApplicationScopedSettingAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Configuration.SpecialSettingAttribute(Global.System.Configuration.SpecialSetting.ConnectionString), _
Global.System.Configuration.DefaultSettingValueAttribute("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\MyDatabase.accdb;" & "Persist Security Info=True")
Is there a way I could change Data Source=|DataDirectory|\MyDatabase.accdb
(last line, scroll right) to something else?
I found an article on how embed resources, but they seem not to apply to a connection string. Furthermore, it seems that (at least in 2008), to access an MS Access Database, it had to be taken out of its embedded state. This would make useless this embedding in my program.
Any help greatly appreciated.