Hi Danny..

AS u suggested i used ExgDBWrite....
 Code:

char dataR[1024];UInt16 cardNo;LocalID dbID;
DmSearchStateType searchState;
Err err= errNone;

err = DmGetNextDatabaseByTypeCreator(true,
&searchState,sysFileTApplication,sysFileCAddress,true,&cardNo, &dbID);
if (!err)
ExgDBWrite(WriteDBProc,NULL, "AddressDB", dbID, cardNo);
...
...
WriteDBProc (void *dataP, UInt32 *sizeP, void *userDataP)
{
StrCat (dataR,dataP);
}

I get following in dataR...
Address
BookcodetFRM�tAIB�tFRMtFRM4MBAR�tSTR�MBAR�tFRM�tFRMlMBARLtFRM�tF
RM�tFRM@tAIS�tAIB�Talt�Talt�tSTRHtFRM~dataTalt�Talt�tcbrTbmpTbmp
�tSTL�Tbmp�tSTL�tSTL�Talt�codetSTL�fmap�tSTR�tSTR�tSTR�tSTR�tSTR
tSTR�tAIN�tSTR�taic�tSTR�tvertSTRtSTRtSTRtSTRtSTR. To create an address
entry that always appears at the top of the address list, simply start the
entry with a symbol, as in -IF FOUND CALL-.  The entry can contain contact
information to be used in case your handheld computer is lost.
. To choose which phone number appears in the Address List screen, select
one from the Show in List pick list.
. The category currently displayed in the Address List screen is assigned
automatically to new Address entries.
. To create a note from the Address List screen, tap the blank area to the
right of the phone number.
UnfiledThe Save Archive Copy option will store deleted records in an archive
file on your Desktop at the next HotSync operation.
!Delete Address...Beam AddressAddress.vcfan
addressAddresses-Unnamed-AddressCopyMain   3.5



If I change type from sysFileTApplication to 'DATA'. I get only "AddressDB"
in dataR.

How to get my address book entries in dataR?

Thanks

rayesh


----- Original Message -----
From: "Danny Epstein" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Tuesday, April 02, 2002 2:16 PM
Subject: RE: Opening database as file.


> > Is it possible to open an existing palm database file??
>
> In Palm OS, we use different terminology. A "database" is not a file. In
> fact, it's sort of the other way around. A "file stream" is a kind of
> database. Both are completely different than VFS files which live on
> expansion cards.
>
> > I tried this code...
> >    fileHandle = FileOpen
> >
(0,"addressdb.pdb",sysFileTFileStream,sysFileCAddress,fileModeReadOnly
> >    ,errp);
> > and fileErrNotFound is returned.
>
> You're trying to open Address Book's database as if it was a file stream.
> See my answer to a similar question (or search for "open database file"):
>
>   http://www.escribe.com/computing/pcpqa/m55408.html
>
> The reason you're getting a different error code from FileOpen is that
> you're including an extension in the file/database name and you're using
the
> wrong case. Database names (and, by extension, file stream names) don't
> generally have extensions. The exception is PQAs. Database names (and,
> therefore, file stream names) are case sensitive. If you used "AddressDB"
> for the second parameter to FileOpen, you'd get fileErrorInvalidDescriptor
> instead. Not much of an improvement, really. :)
>
> If you want a flattened version of AddressDB, use ExgDBWrite to stream it
> out. There is an example of using this function to beam a database in the
> Knowledge Base. If, on the other hand, you're trying to read individual
> records in Address Book's database, use the Data Manager. How to read
> Address Book's database has been discussed on this forum; search the
> archives for info on the database format. Beware that PalmSource or any of
> our licensees could change this format in the future. I think David Fedor
> announced that we (PalmSource) wouldn't make any changes to the PIM app
data
> formats in Palm OS 5, but probably would in the next version of Palm OS.
> --
> Danny @ PalmSource
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to