[prev in list] [next in list] [prev in thread] [next in thread] 

List:       nsbasic-palm
Subject:    Re: [nsbasic-palm] George - DbGetNoRecs
From:       "George Henne" <gh () nsbasic ! com>
Date:       2006-08-31 15:29:59
Message-ID: 20060831152959.16861 () nsbasic ! com
[Download RAW message or body]

Carmine,

Doug's answer is correct in how this function works.

>Following up on the recent threads regarding parsing the MemoDb 
>database, it appears that the NS Basic DbGetNoRecs function returns 
>the total number of records in a database, which includes any 
>records which have been marked for deletion.
>
>While this does not appear to have any impact when working with 
>one's own files (perhaps because when NSBasic deletes a record, it 
>*really* deletes it?), it does cause confusion when working with OS 
>databases such as MemoDb.
>
>My un(der)educated guess is that the runtime is calling the 
>DmNumRecords API when it should perhaps be calling 
>DmNumRecordsInCategory instead.
>
>According to the PalmSource docs:
>
> -------------------
>Comments 
>
>Records that have that have the deleted bit set (that is, records 
>that will be deleted during the next synchronization because the 
>user has marked them deleted) are included in the count. If you want 
>to exclude these records from your count, use DmNumRecordsInCategory
>() and pass dmAllCategories as the category.
>
> -------------------
>
>What say you?  What say Doug?
>
>My suggestion for the next release of NS Basic:  add a flag to 
>DbGetNoRecs, something like this:
>
>  DbGetNoRecs (dbName as database, flag as integer)
>
>where 'flag' is 0 (or non-existent) returns the count of all records 
>in database or 1 returns the count of active records only.
>
> Carmine
>
>
>
>
>
>
>
>
>
>Complete Searchable Archive:
> http://marc.theaimsgroup.com/?l=nsbasic-palm&r=1&w=2
>
>Shortcut URL to this page:
> http://groups.yahoo.com/group/nsbasic-palm  
>Yahoo! Groups Links
>
>
>
> 
>





Complete Searchable Archive:
 http://marc.theaimsgroup.com/?l=nsbasic-palm&r=1&w=2

Shortcut URL to this page:
 http://groups.yahoo.com/group/nsbasic-palm  
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/nsbasic-palm/

<*> To unsubscribe from this group, send an email to:
    nsbasic-palm-unsubscribe@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic