I've developed an application with a large database (8mb) that I'm accessing using DmOpenDataBaseByTypeCreator.
Problem: I want to change the code so that I can access the data in this file using FileOpen, FileSeek and FileRead insted of simply getting the handle using DmQueryRecord. Reason: I want more control over the number of bytes read and where in the file they are read from. DmQueryRecord isn't flexible enough for my needs. Or are there undiscovered secrets in the Database Manager that I haven't discovered? I've played around with FileOpen for ages, but I'm constantly rewarded with ErrorCode 17; fileErrNotStream, which is bullshit since I know it's a perfectly valid palm database file. Or could there be something wrong in my pdb-header and "FileOpen" being more sensitive to this than "DmOpenDatabase..."? I think it's ridiculous that the Palm developers have made something as simple as reading from a binary file in memory so hard. On the PocketPC this all works like charm. By the way; in FileRead, what is meant by "stream objects?" and "number of stream objects?" A byte is a byte right??? I think if the Palm developers invent new terms, it would be nice if they could at least document what they mean by it. This is the code that won't work: FileHand g_file g_file=FileOpen(0, "appname", 'DATA', 'FsKa', fileModeReadOnly | fileModeAnyTypeCreator, g_err); The file "fk.pdb" transferred to the Palm contains a header with "appname", "DATA" and "FsKA". This file works using Database Manager so I don't think this is the source of the problem ...? Any ideas why it won't accept this file as a stream? Answers appreciated... Kristian -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
