Results 1 to 2 of 2
  1. #1
    Addez is offline Senior Member
    Join Date
    Aug 2009
    Rep Power

    Default I dont get it! How do I create an sql database on my own computer?

    I'v been searching all morning trying to figure out how to do it.
    I tried downloading Microsoft SQL Server 2008 R2
    But it can't find the server MSSQLSERVER as I belive I named it
    while using the setup.

    Anyways, Im woundering if there is any simple way to create an SQL database AND be able to use it?!

    Following an example from the webb, totaly without documentation I got this far:
    Java Code:
    String driverName = ""; // MySQL MM JDBC driver 
    			Class.forName(driverName); // Create a connection to the database 
    			String serverName = "MSSQLSERVER"; 
    			String mydatabase = "mydatabase"; 
    			String url = "jdbc:mysql://" + serverName + "/" + mydatabase; // a JDBC url 
    			String username = "username"; 
    			String password = "password"; 
    			connection = DriverManager.getConnection(url, username, password); 
    			} catch (ClassNotFoundException e) { // Could not find the database driver 
    			} catch (SQLException e) { // Could not connect to the database
    But I meen WTBuuck Is driverName?!
    How do I know the url?!
    I dont use username NOR password FFS! I used microsoft authorication thingys!

    Please help me, I can't keep working on my project, reading txt files for info.
    It simply does not work -.-

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Voorschoten, the Netherlands
    Blog Entries
    Rep Power


    If you have the Java 1.6 JDK installed on your computer you also have installed JavaDB (Derby); look in your C:\Program Files\Sun directory; everything is there. JavaDB is a full ANSI compliant relational database engine with ISO 92 SQL implemented. Your documentation (see that directory) tells you how to set up the stuff (it's easy).

    kind regards,


Similar Threads

  1. Replies: 2
    Last Post: 08-13-2010, 11:42 AM
  2. Replies: 1
    Last Post: 05-05-2010, 03:26 AM
  3. Create JMenuBar using DataBase
    By arulmozs in forum AWT / Swing
    Replies: 1
    Last Post: 11-03-2009, 11:52 AM
  4. Replies: 10
    Last Post: 11-01-2009, 09:42 PM
  5. dont let me create simple class
    By itaipee in forum New To Java
    Replies: 5
    Last Post: 01-11-2009, 11:07 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts