|
|
Comments and Discussions
|
|
 |

|
the actual content of a standard pdb file is compressed with RLE algo. any idea?
Regards,
unruledboy_at_gmail_dot_com
http://www.xnlab.com
modified on Saturday, November 28, 2009 8:25 PM
|
|
|
|

|
Hello,
I don't understand why, but I can't retrieved the data from the PDB generated with my application.
(POCKET PC with a processor MIPS).
The PDB can be open but, the data can't be accessed.
I'm sure my pocket application works, 'cause I can access PDB generated in java.
But I try to migrate the java application to C#.
the last things to be done is to create the PDB in C#, please help me !
|
|
|
|

|
First, try to simple pdb file with less data (one or two records),
and do proper logging to diagnose the actual problem.
Muhammad Rizwan Sumra
|
|
|
|

|
Thanks for your reply.
This is the PDB generated with 2 lines from an XML file.
I can't read them from my pocket application cause when I parse it I never find anythiing.
BDPKAMAX Ä“úÄ“úÄ“ú DATAHEBD p@ v@ |@ @ A 1 D 1 D GABELLA 1,2 3630 A JEAN (A) 1,2 3631
|
|
|
|

|
I works under eclipse in a java application to parse the pdb.
The header seems to be ok, but the data area doesn't work.
The number of data is correct, but when I try to pop one I have a very long string with nothing inside, and this for the 4 datas store in.
|
|
|
|

|
i have developing one application related sales for palm
using superwaba platform
now using your project when i create pdb same with creater id and database name as per i can use in my apps from csv
(item name, item code,item description, item price)
data in csv like
Tea TT TEst1 12.00
cofee CC Test2 23.00
and read in my apps using superwaba grid it shows an some numbers in first rows inspite of data
i could not understand why?
please help me if you catch me
|
|
|
|

|
can you send me the exact csv files that you want to port?
Muhammad Rizwan Sumra
|
|
|
|

|
thanks
there is no attachement option so i have give you some records using thread
CAD-1-1-1,CADBURY DAIRY MILK MONEY SEVER SVP,35,30.5,1,N
CAD-2-1-1,CADURY DAIRY MILK 165GM(NO),65,55.3,1,N
CAD-3-1-1,CADBURY DAIRY MILK RS 5/-,5,4.4,1,N
CAD-4-1-1,CADBURY DAIRY MILK 12GM POPPER(NO),6,5.24,1,N
CAD-5-1-1,CADBURY DAIRY MILK RS 5/- 2 IN 1,5,4.37,1,N
CAD-6-1-1,CADBURY DAIRY MILK 24 GMRS 10/-,10,8.75,1,N
CAD-7-1-1,CADBURY DAIRY MILK 40GMRS 17/-,16,13.9,1,N
CAD-8-1-1,CADBURY DAIRY MILK CHUNKY 42 GM(NO),16,13.99,1,N
CAD-9-1-1,CADBURY DAIRY MILK 42GM2IN 1(NO),16,13.99,1,N
CAD-10-1-1,CADBURY DAIRY MILK 12GM*24 UNIT(NO),5,4.37,1,N
CAD-11-1-1,CADBURY DAIRY MILK 12GM*40UNIT(NO),5,4.37,1,N
CAD-12-1-1,CADBURY DAIRY MILK 95GM CARTON(NO),42,36.06,1,N
CAD-13-1-1,BOURNVILLE DARK 44 GM(NO),20,17.17,1,N
CAD-14-1-1,FRUIT &NUT 44GMFLOWPACK(NO),28,24.5,1,N
CAD-15-1-1,FRUIT &NUT 80GM(NO),45,38.63,1,N
CAD-16-1-1,ROST ALMOND 44GM(NO),26,20.75,1,N
CAD-17-1-1,ROST ALMOND 80 GM(NO),45,38.63,1,N
CAD-18-1-1,MILK TREAT CREAMY 13GM,5,4.15,1,N
CAD-19-1-1,MILK TREAT CREAMY 26GM 13*2(NO),10,8.74,1,N
CAD-20-1-1,TEMPATINOS 72GM*15UNIT(OA+AT)(NO),45,36.06,1,N
CAD-20-2-1,TEMPATINOS 72GM*15UNIT(OA+AT)(NO),42,36.06,1,N
CAD-21-1-1,CRACKLE 160GM(NO),75,64.39,1,N
CAD-22-1-1,CRACKLE 42GM FLOEPACK(NO),20,17.17,1,N
in this Header is (string itemid,string itemname,double mrp,double rate,int rate per,string issim)
i have writen header with datatype because it is used in programming of superwaba
Actually my try is that using your code reference i want to create pdb using vb because my desktop application works on vb
thanks
|
|
|
|

|
csv seems fine.
Try to put first simple data like A,a,b,c,1,2,3,4 and check is this readable in your device or not
and let me know if you have some findings.
Muhammad Rizwan Sumra
|
|
|
|

|
I have the same problem and I use, too, superwaba tools to read the pdb.
Did you find an issue to your problem ?
|
|
|
|

|
Am I doing something wrong??
I've taken your compiled demo, and your source files, run the application and the output file appears to not be valid, I've tried PDB Exploerer (which I've used many times and usually has no trouble opening PDB files) I also tried using PDAT/DB application on a palm pilot and the output file appears to be corrupt?
Thanks in advance!... from other people's comments it's possible I'm doing something wrong.. I don't have Visual C# installed, so I'm just using the demo compiled app, and your source test.csv.
I work in VB.net mostly.. so if anyone has a working version I'd apreciate it!
|
|
|
|

|
I have a working version of it on VB.net, I converted it. However remember in .Net you can mix languages
|
|
|
|

|
Hello,
Can you send me the VB.NET source please? Please send to neal AT nc-software DOT com.
Thank you.
Neal Culiner
President, NC Software, Inc.
|
|
|
|

|
Hi dude nice article.... , currently I am working on mobile application development using compact framework 2.0 and MS-SQL Server 2005, my requirement is I have few pdb ( Palm OS Database) files in a shared folder of a file server , I need to read the pdb file and dump the data into MS-SQL Server 2005 can you please let me know how to do it or is SQL replication possible ? if so let me know how to do it.
|
|
|
|

|
once i found these struct (it may descript attributes field, but i'm not sure if it's correct, because of error in pdb_header.attributes field size)
// C++
struct pdb_rec_header { /* 8 bytes total */
DWord offset;
struct {
int delete : 1;
int dirty : 1;
int busy : 1;
int secret : 1;
int category : 4;
} attributes;
char uniqueID[3];
}
source
|
|
|
|

|
Please de inverse Process?
|
|
|
|

|
Anything new on reading PDB files from Net Framework?
Thx in advance
Take care of your ideas, they can come real
|
|
|
|

|
Hi,
I am also interested on this.
Are you still working in how to read PDB files? Do you still plan to release the code?
In any case, thanks for a very good article.
|
|
|
|

|
In Your code is line:
char[] padding={'\0','\0'}; // Two bytes for backup bits
I noticed that those two bytes are not present in all pdbs. Is it possible? Why in some pdbs they are not present?
Dario
|
|
|
|

|
Hi Dario!
These two bytes are appended after list Area before Data Area,,
can you send those pdb's at my e-mail address(rsumra@hotmail.com),
so that i can check this,,
Muhammad Rizwan Sumra
|
|
|
|
|

|
This code is great. Since I am developing on VB .net right now, I translated it to VB.NET, will post code soon.
|
|
|
|

|
use following site to convert this code into VB.Net
http://www.developerfusion.co.uk/utilities/convertcsharptovb.aspx
Muhammad Rizwan Sumra
|
|
|
|

|
I have a PPC device, i have a sqlce app. I want to run my app on PPC, how to install sqlce server for ppc?
hi
|
|
|
|

|
Just so you know.
I am running .NET 2005 and the code does not function properly for me.
I will look into it but it appears that the code where the loop to write the output is never completes.
I have 1238 rows in a csv file but it never completes the run.
Also I may have some data that is not compatible with your generic writer.
|
|
|
|

|
Ok, i don't check this in VS2005, but wait couple of days
i am developing another version that is to be finalized, this
will compatible for every possible datatype.
Muhammad Rizwan Sumra
|
|
|
|
|

|
Hi
Please let me know when you will be updating this article with the latest version of PDB generator that supports all datatypes instead of only strings...
Thanks
|
|
|
|

|
Muhammad,
GeneratePDB is very good, do you have any code in C# to read this PDB file?
Thank you very much
enshosinho
|
|
|
|

|
I have code but need to finalize, after that this
will be online.
Muhammad Rizwan Sumra
|
|
|
|

|
First of all let me say good work. Then do you think it´s posible to create a PDB file in order that both Palm and Pocket PC devices can read it.
Thank you and keep this way
Take care of your ideas, they can come real
|
|
|
|

|
Ofcourse we can, i m currently working on this, hopefully in next week this article will be in this forum.
Rizwan Sumra
|
|
|
|

|
Rizwan,
What a coincidence, I was looking for just this topic about a month ago. You know of course why your efforts will be well rewarded? Well we have the Treo650 and now the Treo700w whose data is incompatible with each other. Having a common PDB base for data transfer will be a godsend to us developers who have to support both platforms now.
When you get your PDB reader working alongside of your PDB writer - do let me know. I'm willing to pay you for your efforts.
Regards,
Dave Cline
|
|
|
|

|
Dave,
okz, i will consider Treo700w data format,
Muhammad Rizwan Sumra
|
|
|
|

|
Muhammad,
I've got a java version of what you've written - again only the writer part.
Part of it looks something like this:
public PalmDBRecord(byte category, boolean dirty, boolean secret)
{
this.category = category;
this.dirty = dirty;
this.secret = secret;
data = ByteBuffer.allocate(65220);
data.order(ByteOrder.BIG_ENDIAN);
}
public PalmDBRecord()
{
this((byte)0, false, false);
}
public void addBoolean(boolean b)
{
if (b) data.put((byte)0xff);
else data.put((byte)0);
}
public void addInteger(short k)
{
data.putShort(k);
}
The reason I mention this is that it looks like in order to insert specific types of data into a PDB record one would need to write the data type bytewise and I don't see this in your PDBWriter code. But perhaps I miss something.
Let me know if you'd like assistance in this regard.
Dave Cline
|
|
|
|

|
Hi Dave,
my application only store string types variables, but we can store any data type according to our desire, basically i m saving string byte by byte , in this regard we can save any datatype at any sequence (little endian or big endian).
Muhammad Rizwan Sumra
|
|
|
|

|
Muhammad,
Maybe we can take this offline to corroborate and return later?
Dave Cline
davecline SPLAT gmail.com
|
|
|
|

|
When will you post the Reading a PDB code?
|
|
|
|

|
It will be nice if we can use your class in order to read (and then modify) un pdb.
Great work
|
|
|
|

|
yes we can. a little bit logic will be required to fetch each record. In pdb file format starting address is present but there is no information about record size to be read so we need to start + end-of-record address. Which we can get from (next-rec address - prev-rec address) will give record size.
Rizwan Sumra
|
|
|
|

|
Great job!
Now all we need is a .NET program to generate PRCs for us
|
|
|
|

|
PRCs are resource based database that requires extensive work and it's little bit difficult to put programming language in PRCs. But that would be considered in future.
Rizwan Sumra
|
|
|
|

|
Well Done!
Muhammad Naseer
|
|
|
|

|
you did really a good job!
thanks
awais khan
|
|
|
|
 |
|
|
General News Suggestion Question Bug Answer Joke Rant Admin
|
This article shows how to create a .pdb file to use as database on Palm devices.
| Type | Article |
| Licence | GPL3 |
| First Posted | 10 Jan 2006 |
| Views | 90,682 |
| Bookmarked | 29 times |
|
|