Results 1 to 3 of 3

Thread: without ODBC

  1. #1
    Heather is offline Senior Member
    Join Date
    Jun 2007
    Posts
    164
    Rep Power
    8

    Default without ODBC

    Hi,
    I'm a little bit new in Java, and I can open a data base SQLServer but I do with an ODBC, I know that when I want to run the application I need to create ODBC, is there any way to connect to the data base without ODBC?

    this is my code
    Java Code:
     
     try {
            Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
            con = DriverManager.getConnection("jdbc:odbc:SIGSA", "sa", "admin");
            stm = con.createStatement();
    }
    thank you
    Last edited by Heather; 06-29-2007 at 02:27 PM.

  2. #2
    Peter is offline Senior Member
    Join Date
    Jun 2007
    Posts
    119
    Rep Power
    0

    Default

    You count with JDBC = Java Database Connectivity
    This is the standard to connect to a data base from java. The API defines the method and interfaces to connect
    You have to download the jar, and then put it in the classpath of your application

  3. #3
    Jack is offline Senior Member
    Join Date
    Jun 2007
    Posts
    130
    Rep Power
    0

    Default

    1. classpath = "path_of_files_jar"
    2 add them to environment variables
    3 in cmd write set classpath=".;path_of_files_jar"

    and that is!

Similar Threads

  1. Using JDBC-ODBC bridge
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 02-06-2008, 09:21 AM
  2. Replies: 1
    Last Post: 08-06-2007, 09:24 PM
  3. Replies: 1
    Last Post: 07-14-2007, 05:59 PM
  4. Replies: 1
    Last Post: 06-27-2007, 05:57 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
  •