Results 1 to 2 of 2
Thread: The DatabaseUtils
- 04-19-2008, 07:38 PM #1
Member
- Join Date
- Apr 2008
- Location
- USA
- Posts
- 12
- Rep Power
- 0
The DatabaseUtils
Since I make powerful new web application, I need to connect to a DatabaseUtils, but I get exception:
com.blogspot.joelnkode.tutorial.java.DatabaseUtils Exception: Cannot read from database.Java Code:import com.blogspot.joelnkode.tutorial.java.*; public class CoolCode extends NewApplication { public void startHere() { Database db = new DatabaseUtils(). connect("localhost", 3306, MY_SQL). with("joe", "ElephantTrunks"). go(); new DatabaseUtils(db).createTable("Users"). addColumn("id", PRIMARY | AUTO). addColumn("username", UNIQUE | NOT_NULL). addColumn("password", NOT_NULL). create(); new DatabaseUtils(db).insertRow("Users"). set("username", "JavaLovenJoe"). setMD5("password", "ElephantTrunks"). insert(); new OutputUtils( new DatabaseUtils(db). selectFrom("Users"). select()); } }
- 04-21-2008, 07:11 PM #2
See the API or support group for your particular library.
Vote for the new slogan to our beloved Java Forums! (closes on September 4, 2008)
Want to voice your opinion on your IDE/Editor of choice? Vote now!
Got a little Capt'n in you? (drink responsibly)


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks