Results 1 to 4 of 4
  1. #1
    K.A Naqvi is offline Member
    Join Date
    Feb 2013
    Posts
    3
    Rep Power
    0

    Default Java with sql sever 2005 connectivity?

    Hey ,
    please can any body tell me how to connect java with sql server 2005 with the help of little example in form of code ,
    i shall be thank ful to you

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,236
    Rep Power
    19

    Default Re: Java with sql sever 2005 connectivity?

    On reviewing your two other posts, you seem to have no idea what a forum is for. A forum is not a code factory.

    Recommended reading: How to ask questions the smart way

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  3. #3
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,236
    Rep Power
    19

    Default Re: Java with sql sever 2005 connectivity?

    One post by K.A Naqvi has been deleted and the member is banned for a year for using foul language.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  4. #4
    sevoxx is offline Oracle Java Developer
    Join Date
    Apr 2013
    Location
    In a PineApple Under the Sea
    Posts
    20
    Rep Power
    0

    Default Re: Java with sql sever 2005 connectivity?

    Quote Originally Posted by K.A Naqvi View Post
    Hey ,
    please can any body tell me how to connect java with sql server 2005 with the help of little example in form of code ,
    i shall be thank ful to you
    Java Code:
    import java.sql.*;
    
    public class SQLServerExampleForTheFool
    {
       public static void main(String[] args)
       {
          try
          {
             java.lang.Class.forName( "com.microsoft.sqlserver.jdbc.SQLServerDriver" );
    
             Connection c = java.sql.DriverManager.getConnection( "jdbc:sqlserver://localhost\SQLEXPRESS;user=SQLDATAUSER;password=database;" );
    
             System.out.println( "Connected!" );
          }
          catch( Exception ex )
          {
             ex.printStackTrace();
          }
       }
    }

Similar Threads

  1. Running sever from Website
    By daytonellwanger in forum Networking
    Replies: 0
    Last Post: 12-15-2010, 02:35 AM
  2. Problem with Sever
    By ersachinjain in forum Networking
    Replies: 2
    Last Post: 01-11-2010, 03:10 PM
  3. Saving image to sever.
    By dudejonne in forum New To Java
    Replies: 5
    Last Post: 11-03-2009, 02:01 PM
  4. Java connecting to sql server 2005
    By pelegk2 in forum JDBC
    Replies: 0
    Last Post: 04-05-2008, 09:17 PM
  5. regarding client -sever
    By gobinathm in forum Advanced Java
    Replies: 0
    Last Post: 11-12-2007, 05:59 AM

Tags for this Thread

Posting Permissions

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