Results 1 to 8 of 8
  1. #1
    Preethi is offline Member
    Join Date
    Jan 2008
    Posts
    83
    Rep Power
    0

    Default Connection the sql server

    Is there any difference in connecting to the sqlserver2000 and 2005...
    i.e.,should i have to use the same code and file which i use to connect to
    the sqlserver2000 to connect to 2005???
    Class.forName("com.microsoft.jdbc.sqlserver.SQLSer verDriver");
    connection = DriverManager.getConnection("jdbc:microsoft:sqlser ver://localhost:1433;DatabaseName=Mine", "sa", "sa");

  2. #2
    daGame is offline Member
    Join Date
    May 2008
    Posts
    24
    Rep Power
    0

    Default

    Yes you can connect to MsSQL 2000 using MsSQL 2005 driver.

    just google around.

    The documentation has sample examples of which driver to use and to connect to Java applications.

    P.S: This is crap, why do i have to have my post count more than 10 to post a link :confused: .I mean it doesnt really make any sense to me, does it?

    P.S again:@OP:

    im sorry i had placed the links for you to see, but this forum software didnt allow me to post the links, so just google around :)
    Last edited by daGame; 06-26-2008 at 10:18 AM. Reason: links

  3. #3
    Preethi is offline Member
    Join Date
    Jan 2008
    Posts
    83
    Rep Power
    0

    Default

    i can able to connect to database as a normal java program,but the problem comes only wen i try to connect from an applet..

  4. #4
    daGame is offline Member
    Join Date
    May 2008
    Posts
    24
    Rep Power
    0

    Default

    Quote Originally Posted by Preethi View Post
    i can able to connect to database as a normal java program,but the problem comes only wen i try to connect from an applet..
    What driver are you using? what errors are you getting?

  5. #5
    Preethi is offline Member
    Join Date
    Jan 2008
    Posts
    83
    Rep Power
    0

    Default

    jdbc driver..

  6. #6
    daGame is offline Member
    Join Date
    May 2008
    Posts
    24
    Rep Power
    0

    Default

    Quote Originally Posted by Preethi View Post
    jdbc driver..
    Of course you are using a jdbc driver, what i meant was which type?,version?

    etc error if any? im sure your driver docs has something to say to you that

    you havent yet read. Read them and im sure you will have a solution. the

    driver docs will have listed support to applets, if not search for a compatible driver.

  7. #7
    Preethi is offline Member
    Join Date
    Jan 2008
    Posts
    83
    Rep Power
    0

    Default

    Can you help me,how to find the driver type in sqlserver 2005....driver version is 2.2.002..

  8. #8
    daGame is offline Member
    Join Date
    May 2008
    Posts
    24
    Rep Power
    0

    Default

    Quote Originally Posted by Preethi View Post
    Can you help me,how to find the driver type in sqlserver 2005....driver version is 2.2.002..
    Did you read the docs?

    Google for "jdbc driver to connect to MsSQL server 2005" the very first link

    gave me the link to download the MsSQL driver, download and read the docs

    carefully. This should work.

    Hope That Helps.

Similar Threads

  1. Replies: 2
    Last Post: 07-15-2008, 06:11 PM
  2. [SOLVED] Connection to file server
    By luislopezco in forum Networking
    Replies: 3
    Last Post: 05-21-2008, 07:00 AM
  3. Sql server connection problem
    By tanvirtonu in forum JDBC
    Replies: 1
    Last Post: 03-31-2008, 12:46 PM
  4. no connection
    By even in forum JDBC
    Replies: 15
    Last Post: 01-02-2008, 01:50 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
  •