Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How can I open *.db file ?

 
Tian Gang
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear all:
Can you help me?
How can I open *.db file ?
Thanks!
 
Min Huang
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
  • 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).
 
Satish Avadhanam
Ranch Hand
Posts: 697
  • Mark post as helpful
  • send pies
  • 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.
 
Vishwa Kumba
Ranch Hand
Posts: 1066
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic