Results 1 to 3 of 3
  1. #1
    Marty is offline Member
    Join Date
    May 2007
    Posts
    38
    Rep Power
    0

    Default S.O.S SyBase Connection

    Hi guys,
    From sybase webpage I've downloaded a jconn3.jar file, I'm trying to connect from a class and I can't!
    Please if someone of you have the sentence of connection to the sybase,Can you send me??? is very urgent
    I do not want to use DNS (ODBC), they have said to me that I have to do an odbc ... I want to connect directly, thank you for everything.
    PD. The base of information is remote. Name of the server: MED and his(her,your) ip is: 10.1.1.82,7000
    Last edited by Marty; 06-01-2007 at 04:39 PM.

  2. #2
    pegitha is offline Member
    Join Date
    Apr 2007
    Location
    Indiana
    Posts
    83
    Rep Power
    0

    Default

    This does not work for you?
    Connection connection = DriverManager.getConnection(url, username, password);
    with the URL being something like:
    Java Code:
    String url = "jdbc:oracle:thin:@" + serverName + ":" + portNumber
    					+ ":" + sid;
    expect of course with the string needed for sybase (as I am using oracle).
    Last edited by pegitha; 05-14-2007 at 05:13 PM.

  3. #3
    Freddie is offline Member
    Join Date
    May 2007
    Posts
    41
    Rep Power
    0

    Default

    Hi Marty:
    I connect to Sybase with java, and wue use DBVisualizer, and
    Squirrel-sql. as a clients
    There are 2 types of server in sybase:
    1 - Sybase Adaptive Server Anywhere
    2 - Sybase Adaptive Server Enterprise

    The url format is different in 1 and 2.
    You have to find what type is your server

    I give you some url so you try:
    type one:
    format:

    jdbc:sybase:Tds:<host>:<port>?ServiceName=<DBNAME>

    example:

    jdbc:sybase:Tds:endeavor.mcilink.com:10000?Service Name=TEST40_SQL


    type 2:
    format:

    jdbc:sybase:Tds:<host>:<port>/<DBNAME>

    example:

    jdbc:sybase:Tds:kenobi2:10010/tsbd_dca


    ah! You have to provide the user and pass

    good luck

Similar Threads

  1. connection problem
    By subash in forum JDBC
    Replies: 5
    Last Post: 04-22-2008, 10:17 AM
  2. JSP - using connection cache
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 01-30-2008, 10:54 AM
  3. no connection
    By even in forum JDBC
    Replies: 15
    Last Post: 01-02-2008, 02:50 PM
  4. JDBC connection
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 11-10-2007, 08:39 PM
  5. connection pool for db2
    By paty in forum JDBC
    Replies: 1
    Last Post: 08-06-2007, 03:43 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
  •