Results 1 to 2 of 2
  1. #1
    ravidasineni is offline Member
    Join Date
    Nov 2009
    Rep Power

    Default getting database connection

    I am doing an application in netbeans.In that i selcect NewProject -->java--> java desktop application --> basic application --> finish.

    In that i connect database like this

    Class.forName(" verDriver");
    conn = DriverManager.getConnection("jdbc:sqlserver://medjava04:1433;databaseName=appforum;userName=sa") ;

    in that i loaded drivers but connection is not getting.

    please help me

  2. #2
    travishein's Avatar
    travishein is offline Senior Member
    Join Date
    Sep 2009
    Rep Power


    JDBC has two pieces to it. the API (interfaces) that come with java, and the vendor-supplied database driver (implementation). In your case, because you are trying to connect to the Microsoft SQL server, have you downloaded their JDBC driver .jar file and placed it somewhere into the classpath that is accessible by netbeans or java applications (such as as the JRE/lib/ext/ folder

    I'm pretty sure the default netbeans IDE would not come with the MS-SQL database (or any other database product for that matter). JDBC drivers.

Similar Threads

  1. Database connection for applet
    By danielsl89 in forum Java Applets
    Replies: 2
    Last Post: 10-21-2009, 12:24 PM
  2. database connection in jsf
    By Srikala in forum JavaServer Faces (JSF)
    Replies: 0
    Last Post: 10-06-2008, 06:53 AM
  3. Database Connection
    By CompleteBeginner in forum New To Java
    Replies: 2
    Last Post: 05-24-2008, 02:30 PM
  4. Database Connection
    By vipinkumarsolanki in forum Advanced Java
    Replies: 2
    Last Post: 11-26-2007, 06:36 AM
  5. Database connection
    By oaklander in forum New To Java
    Replies: 2
    Last Post: 11-12-2007, 11:11 PM

Posting Permissions

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