"Curtis Cameron" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi All, > > I'm new to PalmOS programming, and I'd appreciate some advice about what > direction I should go, before I head too far down what might be the > wrong path. I'm trying to write an application that will look up some ... > How is the best way to handle this data in PalmOS? I gather that 2 MB is > too large for Palm applications, which have a 64 KB limit.
Curtis, STOP what you are doing: I think you are indeed headed down the wrong path. The better way to implement this would be to use standard PalmOS record databases (PDBs) to contain your data, not a filestream database. A PalmOS database is a collection of records. A record is just a chunk of bytes, organized however you see fit for your application. Each record can contain up to 64KB of data. Each database can contain up to 64K (say 65500) records. That is more than enough storage space for your 2-3MB of data. > The DOS version is a text file, with each record equal to one line, and > another file that is an index into that file, to make searches fast. The Implement this with each record of data from your DOS app as individual records in the PalmOS database, and use a second index database if you need to. You will gain many considerable advantages using the record database APIs instead of the file streaming APIs. > So I guess the File Streaming tools are the ones I should use? I've > written a small code fragment to attempt to create a text file on the Palm: I recommend buying a good PalmOS programming book to get you going down the right path. "Palm OS Programming: The Developer's Guide" by Neil Rhodes & Julie McKeehan (published by O'Reilly) is the definitive work in my opinion (though I have several others as well). Good luck, David Thacker PalmOS Certified Developer http://www.palmdatapro.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
