This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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: 18541
    
    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: 41124
    
  45
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.
 
Don't get me started about those stupid light bulbs.
 
subject: Writing a .csv file from.mdb file with Jackcess
 
Similar Threads
Reading a text file
Populating A Folder With Files - Access Denied
Find column number by StringCellValue
write to f file
How to encode image in parts?