File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Naieve to  Database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Reply locked New topic

Naieve to Database

uzma ali
Ranch Hand

Joined: Jun 22, 2007
Posts: 56
I am just a starter. The question might sound very stupid to some of you but I appreciate if somebody answers me.

I downloaded B&S. Having problem in reading database file.

Do I have to use ODBC:JDBC to read this file or some RandomAccessFile method(which I am not really aware of).

I know it is a forum of extreamly expereienced professionals but I'll do work hard and come to a point where I'll be suggesting to others.

Any help is appreciated

Liviu Carausu
Ranch Hand

Joined: Oct 07, 2004
Posts: 159
You should use RandomAccessFile for accessing the file . JDBC is for connecting to real databases management systems (like Oracle, Postgresql) . See JBDC_Wiki
for JDBC API description.

Oracle Certified Master Java SE6 Developer(SCJD),
OCE JEE 6 JSP and Servlets Developer.
Marcelo Camargo
Ranch Hand

Joined: Jul 05, 2007
Posts: 43
If you are doing the SCJD assignment, to get a better idea of what the project is, I recommend the "SCJD Exam with J2SE5" book. It is a short book, and direct to the point. I am sure it will help you about any topic you have.

The book explains in details how to use the random access objects to access a file, and implements an example database.

The second tool is this forum. As you could see, your first question was asked quicly.

Good look,

SCJP5(93%), SCJD(in progress...), SCEA(not started yet...)
uzma ali
Ranch Hand

Joined: Jun 22, 2007
Posts: 56
This is my code and it is getting to end of file exception . Please help

[ July 28, 2007: Message edited by: Barry Gaunt ]
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
Perhaps you should post the output of your program, rather than your code. Why are you skipping 8 bytes at the start of your file?

And please use tags around properly formatted code.
[ July 28, 2007: Message edited by: Barry Gaunt ]

Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
I agree. Here's the link:
subject: Naieve to Database
jQuery in Action, 3rd edition