database as template?

Discussion of HanDBase running on Windows Mobile Classic and Professional (formerly Pocket PC) devices and smartphones and syncing with a desktop computer.

database as template?

Postby Avi » Tue Mar 09, 2010 3:37 am

OK gang, the laws of entropy are getting at the old gray cells .... I think I used to know how to do this, but can't seem to figure it out:

I am using an HTC Advantage 7510 running a custom ROM of WM 6.1, and keep all of my hanDBase databases in a folder on the SSD, which looks like a separate drive to the OS.

I have a database for each of my employees keeping track of various parameters of their daily activities - one for each employee. I want to be able to duplicate the database framework (fields, and if possible links and forms)for a new employee without duplicating any of the records, so I create a filter that hides all the records and do "save as" and use a new name for the file. This however, has a few unwanted results:

1. it puts the newly created database in the root of the "my documents" folder in main memory, not even in the "hanDBase" subfolder of "My Documents",and not where all the other databases are (on the SSD).
2. while the WM file name is what I intended, internally in hanDBase the file still has the old file name - I've never been able to understand why hanDBase works this way, and find it confusing and unhelpful
3. it copies the database with all it's contents, when what I intended was to get a new, empty database with the same structure as the others.

Maybe this message is really a feature request, because the work-around I've devised is to keep a manually created empty "template" database for the express purpose of creating new databases for new workers -- but it still requires a lot of fiddling around to adapt it to a new worker's name, fix the links to my master database of workers, create a new form file, move it to the correct directory, etc.,.

Is there a way to make the process of copying a database structure without the records easier?

-avi
Avi
 
Posts: 72
Joined: Thu Jun 04, 2009 1:36 pm

Re: database as template?

Postby dhaupert » Tue Mar 09, 2010 3:15 pm

Avi wrote: 1. it puts the newly created database in the root of the "my documents" folder in main memory, not even in the "hanDBase" subfolder of "My Documents",and not where all the other databases are (on the SSD).


This sounds like a bug. I will check into this and mark as a bug if I can see the same behavior.

2. while the WM file name is what I intended, internally in hanDBase the file still has the old file name - I've never been able to understand why hanDBase works this way, and find it confusing and unhelpful


HanDBase has a database name which is not the same as the file name. The file name can't have certain characters that are often used in a database name. And since any file editor can rename a file, it makes it easy to mess up relationships and such during syncing and other file operations. So that's why there is an internal name. On the Windows mobile platform, save as gives things a different file name, but then in that saved as file, you can go to the DB Properties and rename the database.

3. it copies the database with all it's contents, when what I intended was to get a new, empty database with the same structure as the others.


It's easy to delete all records in the copied database- just go to Actions, Delete Records, delete all records.

Maybe this message is really a feature request, because the work-around I've devised is to keep a manually created empty "template" database for the express purpose of creating new databases for new workers -- but it still requires a lot of fiddling around to adapt it to a new worker's name, fix the links to my master database of workers, create a new form file, move it to the correct directory, etc.,.

Is there a way to make the process of copying a database structure without the records easier?

-avi


On some of the other platforms where files are not really exposed to the end-user, we have a create template option. But I've always viewed the Windows Mobile version as the more powerful and flexible option, just more advanced to users.

So the process to create a template is this:
Choose File Save As, give a new name.
Open the DB Properties, rename database name.
In the list view, choose Actions, Delete Records, Delete all records.

If you have forms, it does get more complex for sure, I'd agree with that!
dhaupert
 
Posts: 4111
Joined: Tue May 26, 2009 11:51 am


Return to HanDBase for Windows Mobile Classic and Professional

Who is online

Users browsing this forum: No registered users and 0 guests

cron