I am trying to create a new db table when the program is ran for the first time. There is "CreateIfNecessary" option in initializing the db, this will create an empty db.
How can we know if a DB create was triggered? I will need to run some logic to create all necessary tables when the DB gets created for the first time.
If Sql.ExecQuerySingleResult("SELECT count(name) FROM sqlite_masterWHERE type='table' AND name ='yourTableName'") = 0 Then
'don't exist
Else
'exist
End If