Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 5 of 5

Thread: Creating database issue

  1. #1
    Junior Member
    Join Date
    Mar 2012
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Creating database issue

    With all the tutorial that show how to create a JavaDB database in NetBeans, i.e. Working with the Java DB (Derby) Database - NetBeans IDE Tutorial
    it connects to the database with org.apache.derby.jdbc.ClientDriver
    how can I connect with org.apache.derby.jdbc.EmbeddedDriver instead?


  2. #2
    Member
    Join Date
    Jan 2012
    Posts
    57
    My Mood
    Fine
    Thanks
    11
    Thanked 0 Times in 0 Posts

    Default Re: Creating database issue

    how u have created the connection with ClientDriver show me your complete code of connection .. i am also trying the same but its not happenning even after adding the derby.jar files .. in ur case may be u r not adding these libraries

  3. #3
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,318
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: Creating database issue

    Quote Originally Posted by drimades View Post
    With all the tutorial that show how to create a JavaDB database in NetBeans, i.e. Working with the Java DB (Derby) Database - NetBeans IDE Tutorial
    it connects to the database with org.apache.derby.jdbc.ClientDriver
    how can I connect with org.apache.derby.jdbc.EmbeddedDriver instead?
    Provide that driver name when you load the driver using Class.forName. If this doesn't work, then provide the full stack trace and an SSCCE

  4. #4
    Junior Member
    Join Date
    Mar 2012
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Creating database issue

     
            String host = "jdbc:derby://localhost:1527/TownHall; create = true";
            String uName = "yyy";
            String uPass= "1";
            try{
            Connection con = DriverManager.getConnection( host, uName, uPass );
            Statement stmt = con.createStatement( );

  5. #5
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,318
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: Creating database issue

    That is neither a stack trace nor an SSCCE.

Similar Threads

  1. Replies: 2
    Last Post: February 12th, 2012, 07:35 AM
  2. not sure what the issue is here
    By Tfence in forum What's Wrong With My Code?
    Replies: 2
    Last Post: November 28th, 2011, 02:18 AM
  3. Replies: 0
    Last Post: October 25th, 2011, 01:11 AM
  4. Creating and implementing class for creating a calendar object
    By kumalh in forum Object Oriented Programming
    Replies: 3
    Last Post: July 29th, 2011, 08:40 AM
  5. LinkedIntLists issue - how can i move links without creating nodes?
    By bh-chobo in forum What's Wrong With My Code?
    Replies: 0
    Last Post: December 1st, 2010, 03:59 AM