Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

question regarding reading the binary file

 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can I hard code the starting point to read the start of data section? database(flatfile).? what is magic cookie value used for? Should I validate it evertime when user picked their file?

thanks
 
Ranch Hand
Posts: 516
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by fei lin:
Can I hard code the starting point to read the start of data section? database(flatfile).? what is magic cookie value used for? Should I validate it evertime when user picked their file?

thanks



Hi,

yes you can choose to hard code the starting point. I've read on the forum that many people did that. Simply mention it in your design choices.
The magic cookie is is meant to be used by your application to "garantee" that the database file is really the one your are expecting.
Imagine if the SUN examiner tries to use a different database with your application. You don't want that to happen, so you use the magic cookie to detect that..

Regards,
Alex
[ February 08, 2008: Message edited by: Alex Belisle Turcot ]
 
fei lin
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks so much, that clears out my confusion.
 
A wop bop a lu bob a womp bam boom. Tutti frutti ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/t/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic