This site requires JavaScript, please enable it in your browser!
Greenfoot back
Yoman
Yoman wrote ...

2012/7/6

Database Connection

Yoman Yoman

2012/7/6

#
Hi, my user name is Yoman, I am a beginner, needing help on one of my scenarios My library app scenario acts like an application you see at library computers, with a catalog, accounts etc. I'm trying to connect my program with he MySQL Database I have here, but I don't know how If anyone could tell me, that would be great! Thanx!
SPower SPower

2012/7/6

#
http://lmgtfy.com/?q=SQL+database+connection+in+Java http://www.javamex.com/tutorials/database/jdbc_connecting.shtml
mjrb4 mjrb4

2012/7/6

#
@SPower - please drop the "lmgtfy" links, there's really no need for them. Beginners may not know what to search for, they may not know if the information they find is reputable or up to date, or they may simply be confused by different results recommending different approaches. @Yoman - If you really want to integrate with a MySQL database, you'll need to use JDBC along with what's called a particular "driver" to integrate with the database engine of your choice. You can then use the JDBC API to connect to the database and execute queries against it. Oracle have a pretty comprehensive guide here. However, it's not the easiest of things to get started with as a beginner, and if you're just getting to grips with programming you may want to start with another project first that's a bit easier!
SPower SPower

2012/7/6

#
@mjrb4 I'm sorry, but the edit button is gone. @Yoman, please don't mind my first link, it wasn't meant to be rude
Yoman Yoman

2012/7/7

#
If anyone has any code, maybe with some comments to help, that would really elp actually, i've connected to a database through java in Eclipse, i just want to know the syntax and imports for greenfoot
SPower SPower

2012/7/8

#
It's both java: you can use the same imports. If you've downloaded a library, you must open it in greenfoot: http://www.greenfoot.org/doc/native_loader
You need to login to post a reply.