SQLiteDatabase.DatebaseName?

Hi,

I wanted to add a name to my database (this is used later in the software to differentiate between two cases (read or not 2 Columns).

So, in my code (below), I set Emile as the databasename. At database read time, nothing is stored, because nothing is returned:
dbName = db.DatabaseName

I changed the place of the db.DatabaseName = "Emile" line.The is not stored / I cannot get it back.

Var db As New SQLiteDatabase

db.DatabaseFile = f

Try
db.CreateDatabase
db.Connect
db.DatabaseName = "Emile"

Yes, f is valid and was declared (the file is created).

db is valid and alive; I can add a Record with it.

The question is:
Do you use it ?
And if it works for you, how do you make it working ?

PS: I also use that information in the NAG window to make at ease the user (everything is OK, this is my DB).

I don’t use this database name, just the folderitem. This is set when the db is created. The user selects a name, and I create the new db. Nothing else to do.

DatabaseName is used for servers, not the case of SQLite (a local DB engine file based), in this case, the external name is the file name. Not a great design exposing not usable and not implemented items as Host, DatabaseName, etc.

1 Like

So I will do things differently… say add a column in a se’vice table so i know to who I have to display all columns and to who I have to skip the first two columns.

I wanted to keep a default data base file name (the left part of .sqlite).

Thank you all.

PS:


Var db As New SQLiteDatabase

db.Database<tab> Expand to db.DatabaseName

That is what gaves me the idea to use it.