Results 1 to 2 of 2
- 08-22-2010, 09:29 AM #1
Senior Member
- Join Date
- Aug 2009
- Posts
- 294
- Rep Power
- 0
I dont get it! How do I create an sql database on my own computer?
Hello!
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:
But I meen WTBuuck Is driverName?!Java Code:String driverName = "org.gjt.mm.mysql.Driver"; // 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
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 -.-
- 08-22-2010, 09:37 AM #2
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,410
- Blog Entries
- 7
- Rep Power
- 17
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,
Jos
Similar Threads
-
My difficulty to create a database with a java program
By 3c4hy0 in forum JDBCReplies: 2Last Post: 08-13-2010, 11:42 AM -
[Help] How to create a database inventory program
By soul303 in forum NetBeansReplies: 1Last Post: 05-05-2010, 03:26 AM -
Create JMenuBar using DataBase
By arulmozs in forum AWT / SwingReplies: 1Last Post: 11-03-2009, 11:52 AM -
java.util.Formatter doesnt seem to create a file for me incase I dont have one..
By Addez in forum New To JavaReplies: 10Last Post: 11-01-2009, 09:42 PM -
dont let me create simple class
By itaipee in forum New To JavaReplies: 5Last Post: 01-11-2009, 11:07 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks