# Looking for a decent Palm Database article

## Recommended Posts

MitchellH    122
Hi, I entered the world of Palm OS programming early this year and have been successfully programming games for Palm OS (personal, non-released games). I have always wanted to learn about using palm databases and have not been able to find a decent article or tutorial on it. I have googled and found a couple tutorials. One confused me more than helped me, the other was much too short and covered very little and also spent much too much time on storing strings in a pdb. If you have any suggestions as to where I can read up on this subject, please post here. Thank you, Mitchell H.

##### Share on other sites
Armand    164
OKay, then main question is what do you want to know.

The main place I look is the "Programers referance.", as to tuts on how to use them. There arnt that many, because it's not that complicated.

Think of them as indexed files, not databases.

I have a couple of basic wrapers around the api that I use for work. Ones just a basic interface, the other wrapes it to be a large file (Ie one contugiuos record longer than 32k)

Armand.

##### Share on other sites
MitchellH    122
Well I'd like to learn as much as I could. I have made some basic wrappers also for creating, inserting, etc. but for some reason the reading doesnt always work. I guess I'll play around w/ it again im sure its some weird bug.

I just wanted to see some good examples of databases being used.

##### Share on other sites
Armand    164
If you want to do anything meaningful with the databases, you wont find a tut for them.

Most of the time, I make a struct of the data I want, and read and write the records as whole structs.

I also made a util to conver .txt files to .pdb's, then hot synced them to the unit to get test data on to the darn things.

Oh, small peice of code that almost never fails for getting a record
    for tries := 1 to 3 do    begin      fp.MemH := DmGetRecord(DBRef, recno);      if (fp.MemH <> nil) then begin          fp.CurrentRec := MemHandleLock(fp.MemH);          break;      end      else         DmReleaseRecord(DBRef, recno, false);    end;

If this fails, then there is somthing majorly wrong and you need to reset the device.

Armand

##### Share on other sites
MitchellH    122
Ah thanks yes my code look similar to that but the way the data is stored is slightly more complicated. I think i'll change the way its stored rather than have to deal with it.

Also, you develop palm apps in delphi?

##### Share on other sites
Armand    164
Pocket Studio [http://www.winsoft.sk/pstudio.htm] not delphi but it's close. I found the IDE far better than the code warrior dev evniro. Looking back thourh, I should have stuck with code warrior.

what do you want to do with the data?

Armand

## Create an account or sign in to comment

You need to be a member in order to leave a comment

## Create an account

Sign up for a new account in our community. It's easy!

Register a new account