|
-
Database over the Internet
I got a big problem with some java over the Internet. I wanna make a Applet who can save data in a database, over the internet ( ftp )
Havent tried this kind of database before but what do I need to change in this code belove to make it work?? I guess I need some kind of url, username, and password right??
Plz help me!!!
protected void insertObjectInStorage(OID oid, Object object)
{
Spillere s = ( Spillere )object;
Connection con = null;
Statement stmt = null;
try
{
Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver" );
con = DriverManager.getConnection("jdbc dbc:bgladder");
stmt = con.createStatement();
stmt.executeUpdate("INSERT INTO Spillere VALUES ( '" + oid.toString() + "', '"+s.getNavn() + "', '"+ s.getPassword() + "', '"+ s.getWins() + "', '" + s.getLoss() + "', '" + s.getPoints() + "' )");
stmt.close();
con.close();
}
catch(Exception ex)
{
System.err.println("Der er fejl -->" + ex.getMessage() );
}
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks