Results 1 to 3 of 3
  1. #1
    saso1310 is offline Member
    Join Date
    Aug 2008
    Posts
    4
    Rep Power
    0

    Default Remote SQL Server Connection

    look guys i would like to connect from my jsp page to a remote sql server(not localhost) and i wrote it like this :

    Java Code:
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                              con=DriverManager.getConnection("196.219.106.146/MOBIARAB.NET:jdbc:odbc:testc:1433","Test","test");
    and i got this error :
    Java Code:
    run:
    java.sql.SQLException: No suitable driver found for 196.219.106.146/MOBIARAB.NET:jdbc:odbc:testc:1433
    null
            at java.sql.DriverManager.getConnection(DriverManager.java:602)
            at java.sql.DriverManager.getConnection(DriverManager.java:185)
            at remoteconnection.Main.connect(Main.java:43)
            at remoteconnection.Main.main(Main.java:30)
    BUILD SUCCESSFUL (total time: 2 seconds)
    could anyone help about this?

  2. #2
    markw8500's Avatar
    markw8500 is offline Senior Member
    Join Date
    Jul 2008
    Location
    Pennsylvania, USA
    Posts
    136
    Rep Power
    0

    Default

    It looks like you don't have the driver for your database... Check out the documentation for your database to see where you can get it...
    Last edited by markw8500; 05-15-2009 at 05:05 AM.
    Who Cares... As Long As It Works...

  3. #3
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    9

    Default

    Not necessarily. His connection URL is completely wrong. And he's using the bridge rather than the SQL Server JDBC Driver.

    First of all, download and install an SQL Server JDBC Driver, then read this.

Similar Threads

  1. connecting to remote SQL server
    By mahasarathi in forum JavaServer Pages (JSP) and JSTL
    Replies: 2
    Last Post: 04-04-2009, 07:11 AM
  2. Replies: 0
    Last Post: 03-05-2009, 06:45 PM
  3. Replies: 0
    Last Post: 09-01-2008, 12:57 PM
  4. Connection the sql server
    By Preethi in forum New To Java
    Replies: 7
    Last Post: 06-26-2008, 04:05 PM
  5. Sql server connection problem
    By tanvirtonu in forum JDBC
    Replies: 1
    Last Post: 03-31-2008, 01:46 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
  •