Results 1 to 2 of 2
  1. #1
    comp's Avatar
    comp is offline Member
    Join Date
    Mar 2009
    Rep Power

    Default Connect to SQL server 2005


    I m using SQL server 2005 express and netbeans 5.5.
    I want connect to sql server 2005 but I have some problem.
    Here is the code that I have written to get a connection to the SQL Server.
    how can I create a database?what am I supposed to write for Database Name?

    Java Code:
            String connectionUrl = "jdbc:://localhost:1433;" +

  2. #2
    arseny is offline Member
    Join Date
    Mar 2009
    Rep Power


    You have to create database on db server use db server console for it (such issue is out of java scope).

    BTW code:
    String query = "select id,name from A";
    does not execute any select query

Similar Threads

  1. Replies: 4
    Last Post: 09-07-2010, 06:51 AM
  2. hibernate support for sql-server 2005
    By javadev in forum JDBC
    Replies: 2
    Last Post: 06-25-2008, 01:48 PM
  3. Replies: 4
    Last Post: 05-21-2008, 06:55 AM
  4. Java connecting to sql server 2005
    By pelegk2 in forum JDBC
    Replies: 0
    Last Post: 04-05-2008, 09:17 PM
  5. SQL Server 2005 Jdbc connection
    By mgt83 in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 07-27-2007, 04:52 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