GeeCON Prague 2014*
The moose likes JDBC and the fly likes Writing a .csv file from.mdb file with Jackcess Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Databases » JDBC
Bookmark "Writing a .csv file from.mdb file with Jackcess" Watch "Writing a .csv file from.mdb file with Jackcess" New topic
Author

Writing a .csv file from.mdb file with Jackcess

Awet Haddis
Greenhorn

Joined: Jan 25, 2011
Posts: 11
Hi guys,

I am writing a java application that will write the data in the access database to a text file.

My code looks like this:


The errors I am receiving are confusing me as I am new to database programming

Errors:Exception in thread "main" java.lang.Error: Unresolved compilation problems:
db cannot be resolved
out cannot be resolved

at Harvest.Test.dumpDatabase(Test.java:33)
at Harvest.Test.main(Test.java:84)

Any help would be appreciated, thank-you.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18570
    
    8

Nothing to do with JDBC, just basic Java. In this line of code:

there is no variable named "db" in a scope enclosing it.

By the way it would help if you used the "Code" tags around your code, and indented it. You could even edit your post and do that now. It would be much easier for people to read then.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42053
    
  64
Promise us you'll never, ever, do this again:

You simply must handle IOExceptions, even if handling consists only of printing an error message to a log file or console where you'll notice it.

Edited:
Paul Clapham wrote:By the way it would help if you used the "Code" tags around your code, and indented it. You could even edit your post and do that now. It would be much easier for people to read then.

I did that just now, so remember to do it yourself next time, and forever after :-)


Ping & DNS - my free Android networking tools app
Awet Haddis
Greenhorn

Joined: Jan 25, 2011
Posts: 11
Thank-you very much guys.
 
GeeCON Prague 2014
 
subject: Writing a .csv file from.mdb file with Jackcess