I would like to create an MS Access database file that can be referenced by certain classes in a class library project. I want this Access database file to be an embedded resource that is exported to a user-selected directory during run time. Is it possible to export an embedded resource? Here is pseudocode to clarify my objective.
1. User inputs a directory to which the embedded Access database file (*.mdb) will be exported.
2. Program takes the embedded Access database file and exports it to the directory specified in step 1.
3. Program then writes data to the exported database.
'I am assuming I can get the embedded Access database file this way
'and then export it. I just have no idea how to export it.
Dim p_asm As System.Reflection.Assembly = Me.GetType.Assembly
Dim p_stream As System.IO.Stream
p_stream = p_asm.GetManifestResourceStream("Reports.Reports.mdb")
1. User inputs a directory to which the embedded Access database file (*.mdb) will be exported.
2. Program takes the embedded Access database file and exports it to the directory specified in step 1.
3. Program then writes data to the exported database.
'I am assuming I can get the embedded Access database file this way
'and then export it. I just have no idea how to export it.
Dim p_asm As System.Reflection.Assembly = Me.GetType.Assembly
Dim p_stream As System.IO.Stream
p_stream = p_asm.GetManifestResourceStream("Reports.Reports.mdb")