Lenny Palozzi wrote:
> So I now have two identical PDB files, except
> for the database 'type' field. I load both PDBs [...] and proceed to
> Applications | Menu | Info... expecting to see them both. I see one
> entry for both of them! I see the db's name for the second db I
> loaded, and I see double the size and # of records!!
> [W]hy are they showing up as one entry in the Applications App.
It's supposed to do that. It tries to associate every database with its
owning application (by creator-id) and display it as a single entry,
showing the app name and with the size calculated by adding the size of
the app and the sizes of all its databases.
If the Info form is even showing your database name at all, then it
means there isn't an 'appl'ication with the same creator-id.
> My intentions are to have the users add/delete as many databases as
> they like for my application. But deleting the one entry from the
> Applications app. removes them all.
Again by design. The idea is that if the user wants to delete an app,
then ALL associated databases get deleted automatically too.
> I thought the type/creator fields are
> what uniquely identifies databases.
Not quite -- only the db name string has to be unique on the system, at
least as far as the the low level of the db API is concerned.
> So my intentions were to have all my PDB's with
> the same creator id as my app, but different type id's.
That's fine. The OS doesn't actually care what your db type id's are,
except for special OS values like 'appl'. (In my app I just use 'DATA'
for all and open them by name with DmFindDatabase.)
> If I call DmDeleteDatabase(), will that delete only
> the one Database or all my apps databases?
It deletes exactly the single database you specify. This idea of
cascading app+data deletion is a higher level abstraction implemented in
the Applications Launcher. The OS API doesn't do it for you.
> Should I hide my PDB's from the Applications app
> and have a delete db routine in my app?
I'd suggest that. Users expect the system Delete screen to be for
dumping whole applications, so it could be confusing if you want them to
use it for this different task of managing databases. So you should
implement a form in your app for deleting unwanted databases.
-slj-