• 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

How can I open *.db file ?

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear all:
Can you help me?
How can I open *.db file ?
Thanks!
 
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
First of all, I never get to say this, but I see everybody else saying it all the time:
Welcome to Javaranch!

Dear all:
Can you help me?
How can I open *.db file ?


The database file is a binary file, so you'll need to read it with something that implements DataInput, and I suggest RandomAccessFile.
But did you just want to take a peek at its contents? You should grab a hex editor point it to that file. Try something like frhed (free hex editor).
 
Ranch Hand
Posts: 697
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Tian, Welcome to JavaRanch

Originally posted by Tian Gang:
Dear all:
Can you help me?
How can I open *.db file ?
Thanks!


As Min suggested you can use RandomAccessFile to read data from file. You need to go through API before making a conclusion on which methods of RandomAccessFile you want to use.
Good Luck.
 
Ranch Hand
Posts: 1066
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1. You need to understand the DB format first as mentioned in ur instructions, for example: the number of columns in the db file and the size of each column size etc...
2. As Satish suggested, you could probably start off writing a simple java program to read/write the contents of the db file.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic