Here is part of the solution for the question, I can create the DB and Table.
I am still working on the DB CRUD function. I created two projects a VB.Net &
a Class Library Project with a from. Here is the code in the VB.Net project
private void frmStart_Load(object sender, EventArgs e)
{
if (!File.Exists(dbName))
{
btnCreateDB.Visible = true;
btnAdd.Visible = false;
Width = 205;
Height = 115;
Refresh();
}
else
{
Width = 460;
Height = 320;
Refresh();
btnCreateDB.Visible = false;
btnAdd.Visible = true;
tbMessage.Text = "Select Function to Manage Peoples Information";
}
}
private void btnCreateDB_Click(object sender, EventArgs e)
{
Hide();
var form = new DBControl.frmHDB();
{
form.addDB();
form.ShowDialog();
}
Show();
frmStart_Load(null, EventArgs.Empty);
}
Not over joyed with this line of code the frmStart only wants to Load once.
frmStart_Load(null, EventArgs.Empty);
The code in the Class Library Project called from the btnCreateDB on frmStart
public void addDB()
{
if (!File.Exists(dbName))
{
makeDB();
makeFriendsTable();
tbMessage.Text = "I Got Loaded";
}
}
I will comment on what I found very unusual when I was creating these projects
I created each separate from the other and added SQLite to the form in the Class Library then loaded the VB.Net project in VS 2019 and added the Existing Class Library project. The ERROR
Unable to load DLL 'SQLite.Interop.dll
So I am guessing it was not found! So I now have the two projects joined and I deleted the SQLite install and proceeded to reload SQLite. This time NeGet wanted the install in both projects?
It runs and creates the DB but does not show in the Solution Explore till I used the line of code I was not over joyed about or I added one record to the DB. I could see it in the source files.
Thanks to Graeme Grant who kept pushing