java jdbc connection for ms sql server

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ashokformac
    New Member
    • Mar 2007
    • 16

    java jdbc connection for ms sql server

    how to connect remote sql server database form mac os using jdbc driver

    please help me if any one knows the answer ........
  • sicarie
    Recognized Expert Specialist
    • Nov 2006
    • 4677

    #2
    Originally posted by ashokformac
    how to connect remote sql server database form mac os using jdbc driver

    please help me if any one knows the answer ........
    Have you tried googling 'java jdbc'? What have you looked at, what code do you have?

    Comment

    • ashokformac
      New Member
      • Mar 2007
      • 16

      #3
      Originally posted by sicarie
      Have you tried googling 'java jdbc'? What have you looked at, what code do you have?

      yes , i am using jTDS jdbc driver and used the following connection string..

      Class.forName(" net.sourceforge .jtds.jdbc.Driv er");
      onnection connection = DriverManager.g etConnection("j dbc:jtds:sqlser ver://172.10.1.23:143 3/test;user=sa;pa ssword=pass");

      thanks in advance...

      Comment

      • sicarie
        Recognized Expert Specialist
        • Nov 2006
        • 4677

        #4
        Originally posted by ashokformac
        yes , i am using jTDS jdbc driver and used the following connection string..

        Class.forName(" net.sourceforge .jtds.jdbc.Driv er");
        onnection connection = DriverManager.g etConnection("j dbc:jtds:sqlser ver://172.10.1.23:143 3/test;user=sa;pa ssword=pass");

        thanks in advance...
        Are you getting an error message? If so, what is it?

        I think your problem lies in 'DriverManager. getConnection(" jdbc:jtds:sqlse rver://172.10.1.23:143 3/test;user=sa;pa ssword=pass");' that line, I'm not sure if the 172.10.1.23:143 3/test is correct - is /test the published or shared folder you are trying to reach?

        Comment

        Working...