Re: Fw: Re: How know the name fields of PDB file

2003-12-26 Thread SLO Revo News
With good reason--there is typically information about record 
structure stored in the Appinfo block.
Oops - typing too fast and not proofreading. Typically there is NO 
information. Sorry about that.

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


Re: Fw: Re: How know the name fields of PDB file

2003-12-26 Thread SLO Revo News
so far I'm not convinced that we can retrieve the record structure
given an arbitrary pdb along with its AppInfo block.
With good reason--there is typically information about record 
structure stored in the Appinfo block.

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


Fw: Re: How know the name fields of PDB file

2003-12-26 Thread weiliao2000
I remember the original question was " how to get the field names of 
a record"

Let's assume that we can retrieve the AppInfo block from the PDB 
header. If the AppInfo block is defined as 

typedef struct { 
UInt16  renamedCategories; 
CharcategoryLabels[16][16]; 
UInt8   categoryUniqIDs[16]; 
UInt8   lastUniqID; 
UInt8   padding; 
} AppInfoType; 

as on this page: 
http://www.palmos.com/dev/support/docs/fileformats/PDB+PRCFormat.html

then how is the category information related to the field 
names/types/offsets/length ?

so far I'm not convinced that we can retrieve the record structure 
given an arbitrary pdb along with its AppInfo block.

Wei









--- In [EMAIL PROTECTED], "Viren" <[EMAIL PROTECTED]> wrote:
> Thanks Doug for that clarification.
> 
> -Viren
> 
> --- In [EMAIL PROTECTED], Douglas Handy <[EMAIL PROTECTED]> 
> wrote:
> > Viren,
> > 
> > >Correct. But Doug, how would I know what all info is it dumping 
in 
> > >the AppInfoBlock or SortInfoBlock ? 
> > 
> > You don't have to know what or why they put something in those 
> blocks, only that
> > they exist and how to get to the records.  See the docs at
> > 
> 
http://www.palmos.com/dev/support/docs/fileformats/Intro.html#939653 
> for more
> > information.
> > 
> > You don't want to assume the records begin after the recordlist.  
> On the above
> > page you'll find a specific warning about that:
> > 
> >   "IMPORTANT: There is always a gap between the final record list 
> in the header
> > and the first block of data in the database, where the first 
block 
> might be one
> > of the following: the appInfo block, the sortInfo block, raw 
record 
> or resource
> > data, or the end of the file. The gap is traditionally two bytes 
> long; however,
> > if you write code to parse a database, your code should be able 
to 
> handle any
> > size gap, from zero bytes long and up. "
> > 
> > >I mean there is no way for me to 
> > >know by how much do I have to increment my offset 
> > 
> > Start at the above page and read the documentation on the 
formats.  
> It is
> > possible to know...
> > 
> > Doug
> > 
> > -- 
> > For information on using the Palm Developer Forums, or to 
> unsubscribe, please see http://www.palmos.com/dev/support/forums/
> 
> 
> -- 
> For information on using the Palm Developer Forums, or to 
unsubscribe, please see http://www.palmos.com/dev/support/forums/


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


Fw: Re: How know the name fields of PDB file

2003-08-19 Thread Viren
Thanks Doug for that clarification.

-Viren

--- In [EMAIL PROTECTED], Douglas Handy <[EMAIL PROTECTED]> 
wrote:
> Viren,
> 
> >Correct. But Doug, how would I know what all info is it dumping in 
> >the AppInfoBlock or SortInfoBlock ? 
> 
> You don't have to know what or why they put something in those 
blocks, only that
> they exist and how to get to the records.  See the docs at
> 
http://www.palmos.com/dev/support/docs/fileformats/Intro.html#939653 
for more
> information.
> 
> You don't want to assume the records begin after the recordlist.  
On the above
> page you'll find a specific warning about that:
> 
>   "IMPORTANT: There is always a gap between the final record list 
in the header
> and the first block of data in the database, where the first block 
might be one
> of the following: the appInfo block, the sortInfo block, raw record 
or resource
> data, or the end of the file. The gap is traditionally two bytes 
long; however,
> if you write code to parse a database, your code should be able to 
handle any
> size gap, from zero bytes long and up. "
> 
> >I mean there is no way for me to 
> >know by how much do I have to increment my offset 
> 
> Start at the above page and read the documentation on the formats.  
It is
> possible to know...
> 
> Doug
> 
> -- 
> For information on using the Palm Developer Forums, or to 
unsubscribe, please see http://www.palmos.com/dev/support/forums/


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


Fw: Re: How know the name fields of PDB file

2003-08-14 Thread rguevara
Thanks, i found the dump-db utility, work rigth with PDB files created by the
other utility but even crash with the PDB created in the PALM,i think what the
error found in the creation of the PDB, when i write some registers the size is:
typedef struct  {
 unsigned long  norden;  //codigo-Vendedor + norden
 unsigned long  cantitems; //Cantidad de items
 unsigned long  clie;   //Vend
 Char   cantidad[8]; //Cantidad pedida
 Char   precio[8]; //Precio
 Char   codigo[15];//Codigo producto
} ItemOrdReg;
and when write one record field or other:

DmStrCopy(s,offsetof(ItemOrdReg,codigo), item.codigo);
write only the text and the rest of space reserved for the field is garbage!
(I VIEW WITH RSCREDIT)
. . . . . . . .//Write the integer values
. . 0 . 2 5 0 .//the "integer" values in string
. . . . 4 0 . .
. . . . D I A C//The codigo field "DIACAN17" with garbage at end
A N 1 7 . s y s
. ( . . . .

i think what erasing the garbage of the string fields, solve the problem

-- Forwarded Message ---
From: "drvirens" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Wed, 13 Aug 2003 14:22:07 -0000
Subject: Fw: Re: How know  the name fields of PDB file

Hi there,

Hmmm. So you are using third-party tool for conversions. As Thomas
said in his reply, the names could be stored in header part of the
PDB. You may like to ask it to the implementers of the tool or crack
it out yourself.

I remember, in my ealrier days in Palm, when my company had decided
to go for AppForge, we could not cope up with its database tools. The
APpForge, it was noticed then ( dunno the current case ), used to
dump too much of proprietary info after the database header ( i.e.
after the first 78 bytes in pdb ). And our palm-reader ( in-house
developed utility ) was going for a toss sicne it was assuming that
what would follow after 78 bytes would be really a record header ( b-
bytes)...however, things used to fall apart thanks to AppForge
implementations.

-Viren

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


--
Open WebMail Project (http://openwebmail.org)

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


Re: Fw: Re: How know the name fields of PDB file

2003-08-14 Thread Douglas Handy
Viren,

>our palm-reader ( in-house 
>developed utility ) was going for a toss sicne it was assuming that 
>what would follow after 78 bytes would be really a record header ( b-
>bytes)...however, things used to fall apart thanks to AppForge 
>implementations.

No, things fell apart because you made the assumption the recordlist info would
follow a 78 byte header.  Per the Palm OS docs you need to account for the
AppInfoBlock, if present, and the SortInfoBlock, if present.  It is not
AppForge's fault if you made false assumptions.

Doug

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


Re: Fw: Re: How know the name fields of PDB file

2003-08-14 Thread David Martin
AppForge has a dll for reading/writing their PDBs on the desktop. code
looks the same as it is on the handheld, so you could write an
extraction program with Visual Basic to work with the files fairly
quickly. 

not that I advocate using AppForge, but the tools are all there.


David M


--- drvirens <[EMAIL PROTECTED]> wrote:
> 
> Thanks Doug for that explanation. And nice to see ya' after a long 
> time. :-)
> 
> > No, things fell apart because you made the assumption the 
> recordlist info would
> > follow a 78 byte header.  Per the Palm OS docs you need to account 
> for the
> > AppInfoBlock, if present, and the SortInfoBlock, if present.  It is
> 
> not
> > AppForge's fault if you made false assumptions.
> 
> Correct. But Doug, how would I know what all info is it dumping in 
> the AppInfoBlock or SortInfoBlock ? I mean there is no way for me to 
> know by how much do I have to increment my offset unless I know what 
> all bytes have been dumped in there. One could simply put in some 
> secret messages/easters etc in the above block and it would be just 
> too much for my "lil" palm-based PDB reader.
> 
> -Viren
> 
> 
> 
> -- 
> For information on using the Palm Developer Forums, or to
> unsubscribe, please see http://www.palmos.com/dev/support/forums/


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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


Fw: Re: How know the name fields of PDB file

2003-08-14 Thread drvirens
Hi there,

Hmmm. So you are using third-party tool for conversions. As Thomas 
said in his reply, the names could be stored in header part of the 
PDB. You may like to ask it to the implementers of the tool or crack 
it out yourself.

I remember, in my ealrier days in Palm, when my company had decided 
to go for AppForge, we could not cope up with its database tools. The 
APpForge, it was noticed then ( dunno the current case ), used to 
dump too much of proprietary info after the database header ( i.e. 
after the first 78 bytes in pdb ). And our palm-reader ( in-house 
developed utility ) was going for a toss sicne it was assuming that 
what would follow after 78 bytes would be really a record header ( b-
bytes)...however, things used to fall apart thanks to AppForge 
implementations.

-Viren




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


Fw: Re: How know the name fields of PDB file

2003-08-14 Thread rguevara
I use palm-db-tools utilities for convert databases. When use csv2pdb i define
the name fields in the info file or command line as:

csv2pdb -f code,integer -f name,string -t "ClientsDB" client.csv client.pdb

and editing later the pdb file i see the name fields in the binary code (whith
vi), but when i make the pdb file in the palm i don't know these name fields for
the INF file, because if write any name don't work, i get this error:
Violacion de Segmento

(Note: Segment violation)
 ¿?

-- Forwarded Message ---
From: "drvirens" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Wed, 13 Aug 2003 13:43:19 -0000
Subject: Re: How know  the name fields of PDB file

Please, can you explain your question in more details ?

Do you wanna know the names of the fields of a PDB file ? If so, I am
sorry that is not possible to do since the PDB does not store
the "names" of fileds anyway. It stores the records as "raw" data. It
is the programmer who has to interprete those raw bytes and work
with.

-Viren

--- In [EMAIL PROTECTED], "rguevara" <[EMAIL PROTECTED]>
wrote:
> Hi all, i need know the name field of the record in a PDB file for
convert a PDB
> to CSV file (i need for the INF file). Exist one application
like "par" for show
> this name fields?
>
> --
> Open WebMail Project (http://openwebmail.org)
>
> --
> For information on using the Palm Developer Forums, or to
unsubscribe, please see http://www.palmos.com/dev/support/forums/

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


--
Open WebMail Project (http://openwebmail.org)

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


Re: Fw: Re: How know the name fields of PDB file

2003-08-14 Thread Douglas Handy
Viren,

>Correct. But Doug, how would I know what all info is it dumping in 
>the AppInfoBlock or SortInfoBlock ? 

You don't have to know what or why they put something in those blocks, only that
they exist and how to get to the records.  See the docs at
http://www.palmos.com/dev/support/docs/fileformats/Intro.html#939653 for more
information.

You don't want to assume the records begin after the recordlist.  On the above
page you'll find a specific warning about that:

  "IMPORTANT: There is always a gap between the final record list in the header
and the first block of data in the database, where the first block might be one
of the following: the appInfo block, the sortInfo block, raw record or resource
data, or the end of the file. The gap is traditionally two bytes long; however,
if you write code to parse a database, your code should be able to handle any
size gap, from zero bytes long and up. "

>I mean there is no way for me to 
>know by how much do I have to increment my offset 

Start at the above page and read the documentation on the formats.  It is
possible to know...

Doug

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


Re: How know the name fields of PDB file

2003-08-14 Thread Thomas Damme
Hi,

some CSV->PDB Converters store the field names in the AppInfoBlock of a
database. Take a look at DmDatabaseInfo to retrieve the AppInfoBlock if it
is there. Some FileManagers also show you, if a InfoBlock is there so check
this first before you do too much work.

Thomas


"rguevara" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
>
> Hi all, i need know the name field of the record in a PDB file for convert
a PDB
> to CSV file (i need for the INF file). Exist one application like "par"
for show
> this name fields?
>
> --
> Open WebMail Project (http://openwebmail.org)
>
>



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


Fw: Re: How know the name fields of PDB file

2003-08-14 Thread drvirens

Thanks Doug for that explanation. And nice to see ya' after a long 
time. :-)

> No, things fell apart because you made the assumption the 
recordlist info would
> follow a 78 byte header.  Per the Palm OS docs you need to account 
for the
> AppInfoBlock, if present, and the SortInfoBlock, if present.  It is 
not
> AppForge's fault if you made false assumptions.

Correct. But Doug, how would I know what all info is it dumping in 
the AppInfoBlock or SortInfoBlock ? I mean there is no way for me to 
know by how much do I have to increment my offset unless I know what 
all bytes have been dumped in there. One could simply put in some 
secret messages/easters etc in the above block and it would be just 
too much for my "lil" palm-based PDB reader.

-Viren



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


Re: How know the name fields of PDB file

2003-08-14 Thread drvirens
Please, can you explain your question in more details ?

Do you wanna know the names of the fields of a PDB file ? If so, I am 
sorry that is not possible to do since the PDB does not store 
the "names" of fileds anyway. It stores the records as "raw" data. It 
is the programmer who has to interprete those raw bytes and work 
with. 
 
-Viren

--- In [EMAIL PROTECTED], "rguevara" <[EMAIL PROTECTED]> 
wrote:
> Hi all, i need know the name field of the record in a PDB file for 
convert a PDB
> to CSV file (i need for the INF file). Exist one application 
like "par" for show
> this name fields?
> 
> --
> Open WebMail Project (http://openwebmail.org)
> 
> -- 
> For information on using the Palm Developer Forums, or to 
unsubscribe, please see http://www.palmos.com/dev/support/forums/


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