Switch to full style
Java2 codes,problems ,discussions and solutions are here
Post a reply

creating database in netbeans

Fri Dec 14, 2012 2:16 pm

I've tried to create a database in netbeans and each time i do that it gives the following message:
"An error occured while creating the database: null."

- I made sure i started the server and this is the message of connectivity:
Apache Derby Network Server - 10.6.2.1 - (999685) started and ready to accept connections on port 1527

-I reinstalled netbeans and i have version 7.1 right now.

-I added all the .JAR file i needed for derby and clientderby in the libraries, even though its doesnt have to do with creating database.

- I opened netbeans as administrator.

any ideas on how to be able to create a database in the Java DB?



Re: creating database in netbeans

Sun Dec 16, 2012 10:10 pm

So u just want to connect to database or it must be Derby database, if you are not insisting on Netbeans Included Derby , you can use MYSQL for example just download it and start your work ,

If you just asking about opening a connection this topic will helps you:
java/navigating-to-database-using-java-t9365.html

But if you want to create a new database from your java source code this snippet will clear the idea:
Code:

myDBConnection 
= DriverManager.getConnection
("jdbc:mysql://localhost/?user=root&password=root"); 
myStatement
=myDBConnection.createStatement();
int Result=s.executeUpdate("CREATE DATABASE newDbName");
 


I hope i helped

Re: creating database in netbeans

Fri Dec 28, 2012 7:06 am

Go through the site, you can easily create database in netbeans :
Code:
http://wiki.netbeans.org/CreateDatabaseFromNetbeans


Post a reply
  Related Posts  to : creating database in netbeans
 Creating a Database in MySQL     -  
 applet in netbeans     -  
 information about netbeans IDE     -  
 i am using NetBeans 7.0, HELP NEEDED - URGENT     -  
 Data Base problem with Netbeans IDE     -  
 selection of checkbox in buttongroup in netbeans     -  
 chat system project in java using netbeans     -  
 Creating a Method in jsp     -  
 Creating table using div tag     -  
 Creating a Directory in php     -