On 17 November 2010 11:13, David Boccabella <dav...@shamirlens.com.au>wrote:
> Hi folks > > I have a NETMF project I am trying to work on – but the code from C# > Framework 4.1 should work. My target is an SD card and I do not have any > database capabilities like SQL.. > > > > In the old VB6 days you could create random files, and by defining the > record length you could easily move from one record to the next. > > > > But I am at loss to find a similar type of functionality in C#. I can > understand that to do this I will need to create a class, and serialise that > class before storing the object on the disk.. But moving to a particular > record has gotten me stuck. > > The only way I can see at the moment is to use the RecordLength * > RecordNum and then SEEK to that byte location on the disk file. > > What level are you working at with the SD card? low-level SPI, secure or FAT file system? It's a 512 byte block, so you probably want your record to use a multiple of that, or pad it up. (memory's cheap) > > > My memory space is also small so I cannot load the file into memory and > move through it as a collection. > > > > Any suggestions/advice. > > Many thanks > > Dave > > > > > > [image: cid:image002.jpg@01CAF8CB.4090A030] > > [image: cid:image003.jpg@01CAF8CB.4090A030] > > *David Boccabella IT Manager* > > *Shamir Australia Pty Ltd.* | 1/23 Luke St. Lytton, QLD, 4178 > P.O. Box 3346, Tingalpa DC 4173 > > P: 1300-553-465 | M: 0433-808-525 | F: 1300-554-075 > > www.shamirlens.com.au <http://www.shamir.co.il/> > > > > > -- Meski "Going to Starbucks for coffee is like going to prison for sex. Sure, you'll get it, but it's going to be rough" - Adam Hills
<<image001.jpg>>
<<image002.jpg>>