🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.comp.sys.palmtops.pilot
Article #192

Database programming problems

#192
From: Ian
Date: Tue, 09 Mar 2004 05:24
64 lines
4394 bytes
Hey all, I've got a few problems.

I've written a program that opens/closes databases.  I would like to be able
to beam/delete these databases independently of the app.
I've discovered that if the app and the database have the same creator ID,
you only get one entry in the "Delete" menu option of the OS (using a Palm
m100, this is all running on POSE).  Fair enough, but it's not what I want.

So I give them different CreaterID's, and my (multiple) databases appear in
the delete list.  I can view how many records each db holds, and even the
version of the db (I tried setting it to something else using
DmSetDatabaseInfo but that didn't work... but that's not my biggest
problem).  Here's where things get interesting.

If I select a database and click delete, everything appears fine, it says
are you sure, and the database disappears from the list.  BUT, if I go back
into delete, the database is magically back.  Worse than that, if I got into
Info after 'deleting' this database and try to view how many records, or the
version of the database, BAM:

Applications (3.5) called SysFatalAlert with the message:
"MemoryMgr.c, Line:4359, Free Handle".

Which POSE obviously doesn't like, and makes you reset after.  For this
reason, I haven't tested it on an actual Palm yet. :)

And just to top things off, even when CreatorID and database ID are
different (ie, databases appear happily in the delete list) they still don't
appear in the Beam list.  This is what I'm doing with my database
attributes:

<pre>
  DmDatabaseInfo(dbs[i]->card, dbs[i]->id, NULL, &attributes, &version,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
  attributes |= dmHdrAttrBackup;    // The database should be backed up to
the desktop computer if no application-specific conduit is available.
  attributes |= dmHdrAttrBundle;    // The database is bundled with its
application during a beam
  attributes &= ~dmHdrAttrCopyPrevention ; // Prevents the database from
being copied by methods such as IR beaming.
  attributes &= ~dmHdrAttrHidden;    // This database should be hidden from
view

  version = 2;
  // Setting the version is not working... YET
  DmSetDatabaseInfo(dbs[i]->card, dbs[i]->id, NULL, &attributes, &version,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
</pre>

As you see, I've tried to fix everything with the appropriate flags, still
no go.

To get around the problem of deleting databases, I've written the capability
into my app to delete them (and that works), but I'd rather have it the
other way around, as these databases are data files to be sent to the
computer, then (probably, not necessarily) deleted.

So I guess there are 3 main problems:
Can't delete from the Launcher app (pretends to delete, actually stays
there, then causes crashes)
Can't set the version on the database
Can't beam the database

Any help or hints at all would be greatly appreciated!
Technical Details
Message-ID: <404d54ec$1@news.cc.swin.edu.au>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!news1.optus.net.au!optus!news.optus.net.au!53ab2750!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11219a,c21ea7b23caca31a,start
X-Google-Attributes: gid11219a,public
X-Google-Thread: 109e18,c21ea7b23caca31a,start
X-Google-Attributes: gid109e18,public
X-Google-Thread: 10baa0,c21ea7b23caca31a,start
X-Google-Attributes: gid10baa0,public
X-Google-Thread: 112073,c21ea7b23caca31a,start
X-Google-Attributes: gid112073,public
X-Google-ArrivalTime: 2004-03-08 21:24:32 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!news1.optus.net.au!optus!news.optus.net.au!53ab2750!not-for-mail
From: "Ian" <a@a.a>
Newsgroups: alt.comp.sys.palmtops.pilot,codewarrior.palm,comp.sys.palmtops,comp.sys.palmtops.pilot
Subject: Database programming problems
Lines: 66
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
X-Original-NNTP-Posting-Host: bprime-w2k.bsee.swin.edu.au
Message-ID: <404d54ec$1@news.cc.swin.edu.au>
X-Original-Trace: 9 Mar 2004 16:23:56 +1000, bprime-w2k.bsee.swin.edu.au
Organization: Swinburne University of Technology
X-Original-NNTP-Posting-Host: news.cc.swin.edu.au
X-Original-Trace: 9 Mar 2004 16:24:43 +1100, news.cc.swin.edu.au
Date: Tue, 09 Mar 2004 05:24:31 GMT
NNTP-Posting-Host: 203.21.131.11
X-Trace: news.optus.net.au 1078809871 203.21.131.11 (Tue, 09 Mar 2004 16:24:31 EST)
NNTP-Posting-Date: Tue, 09 Mar 2004 16:24:31 EST