ODBC connection

ODBC connection

import java.sql.*;
import java.util.*;
public class OJDBCAvi
{

    public static void main(String args[])throws Exception
    {
        String sql="insert into year values(3,'avi1')";
        Class c=Class.forName("oracle.jdbc.driver.OracleDriver");
        Driver d=(Driver)c.newInstance();
        String s="jdbc:oracle:thin:@localhost:1521:ORCL";
        Properties p=new Properties();
        p.put("user","scott");
        p.put("password","tiger");
        Connection con=d.connect(s,p);
        Statement st=con.createStatement();
        st.executeUpdate(sql);
        con.close();
        System.out.println("table details are saved");
    }
}

This is my ODBC program,bt here I am getting error i.e Exception in Thread "main" java.sql.SQLException:Io Exception : The network Adapter could not establish the connection.

View Answers









Related Tutorials/Questions & Answers:
ODBC connection
ODBC connection   import java.sql.*; import java.util.*; public...("password","tiger"); Connection con=d.connect(s,p); Statement st... ODBC program,bt here I am getting error i.e Exception in Thread "main
ODBC connection
ODBC connection   import java.sql.*; import java.util.*; public...("password","tiger"); Connection con=d.connect(s,p); Statement st... ODBC program,bt here I am getting error i.e Exception in Thread "main
Advertisements
ODBC connection
ODBC connection   import java.sql.*; import java.util.*; public...("password","tiger"); Connection con=d.connect(s,p); Statement st... ODBC program,bt here I am getting error i.e Exception in Thread "main
jdbc odbc connection
jdbc odbc connection  i need a program in java which uses a jdbc odbc connection   Hi, You can create odbc datasource on your windows computer and then access in your Java program.ADS_TO_REPLACE_1 Read the JDBC ODBC
JDBC-Odbc Connection
JDBC-ODBC Connection       JDBC-ODBC Connection is a JDBC driver that translates the operation... help you in explaining JDBC Odbc Connection in Java. The code explains you
JDBC ODBC Connection In Java
JDBC ODBC Connection In Java In this section we will read about the various aspects of JDBC ODBC such as, JDBC-ODBC bridge, JDBC ODBC connection, how... is sun.jdbc.odbc.JdbcOdbcDriver.ADS_TO_REPLACE_1 JDBC ODBC Connection To Connect
Connection using Jdbc-odbc bridge Driver
Connection using JDBC-ODBC bridge driver JDBCExample.java... program, Jdbc-Odbc bridge driver create connection between java application...=DriverManager.getConnection("jdbc:odbc:datastud"); --In the above code, connection class
odbc - Java Beginners
What is odbc connection  What is odbc connection
PHP SQL ODBC
PHP SQL ODBC       This example illustrates how to create an ODBC Connection for php application. Follow the given steps to create an ODBC connection to a MS Access Database: 
online quiz program coding using jsp, jdbc odbc connection with ms. access.. Thank you.
online quiz program coding using jsp, jdbc odbc connection with ms. access... odbc connection with ms. access.. Thank you.   Create table test...").newInstance(); Connection connection = DriverManager.getConnection("jdbc:mysql
Php Sql ODBC
Php Sql ODBC  This example illustrates how to create a ODBC Connection for php application. With an ODBC connection, you can connect to any database, on any computer in your network, as long as an ODBC connection is available
jdbc odbc
{ Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection con = DriverManager.getConnection("jdbc:odbc:swing"); String sql = "INSERT
JDBC-ODBC
JDBC-ODBC  HI what should i give names for DNS and TNS in Administrative Tools so that there will be connection between Database (oracle) and java.Actually how to operate Administrative Tools
JDBC-ODBC
JDBC-ODBC  HI what should i give names for DNS and TNS in Administrative Tools so that there will be connection between Database (oracle) and java.Actually how to operate Administrative Tools
jdbc odbc
jdbc odbc   i have two tables in database 1table's attribute is foreign key of another in this case how to retrive value from both table and show in a gridview combine using java code   Sql query to retrieve values
The JDBC-ODBC Bridge.
The JDBC-ODBC Bridge.  Are there any ODBC drivers that do not work with the JDBC-ODBC Bridge
Connection
Connection  What is Connection
connection
connection   how to make multiple database connection using jdbc
What is ODBC - JDBC
What is ODBC  What is Java ODBC and JDBC?   Method of type... | ODBC Driver | Data base Odbc drivers
Java Jdbc-odbc
Java Jdbc-odbc  What is the difference between JDBC and ODBC
Java JDBC ODBC
Java JDBC ODBC  What is the difference between JDBC and ODBC
connection
the connection with the available port on the host machine: import java.net.... the connection was not established. Predict the output of the preceding code. Explain why the connection cannot be established
JDBC ODBC related problem
JDBC ODBC related problem  i WANT HELP RELATED TO JDBC CONNECTIVITY... { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection con; con = DriverManager.getConnection("jdbc:odbc:Digambar
odbc MS EXCEL
odbc MS EXCEL  hey my whole database is stored in MS Excel. so please tell me that can we connect to that database. if yes, how to do that. please help me out i am doing it in netbeans can please tell me the steps
JDBC-ODBC Bridge multi-threaded.
JDBC-ODBC Bridge multi-threaded.  Is the JDBC-ODBC Bridge multi-threaded
JDBC-Odbc Connectivity
JDBC-ODBC Connectivity       The code illustrates an example from JDBC-ODBC... ( ) returns you an object of connection class. This method is used to built
Java jdbc connection
Java jdbc connection  Does the JDBC-ODBC Bridge support multiple concurrent open statements per connection
how to set fetch size for jdbc odbc driver
how to set fetch size for jdbc odbc driver  What is the default fetch size for the JDBC ODBC driver and how can i fetch a set of results for JDBC ODBC driver?   Fetching results JDBC ODBC Driver A. The default fetch
jdbc odbc sql server exception
jdbc odbc sql server exception  Hi, I am trying to use sql server with java jdbc odbc but I am getting this exception java.sql.SQLException: [Microsoft][SQL Server Native Client 10.0][SQL Server]Incorrect syntax near '@P1
how to connect java with ms access using odbc in eclipse
"); //Connection con = DriverManager.getConnection("jdbc:odbc:DRIVER={Microsoft Access Driver (*.accdb)};DBQ=student.accdb","",""); Connection con...how to connect java with ms access using odbc in eclipse  import
ModuleNotFoundError: No module named 'odoo8-addon-import-odbc'
ModuleNotFoundError: No module named 'odoo8-addon-import-odbc'  Hi...: No module named 'odoo8-addon-import-odbc' How to remove the ModuleNotFoundError: No module named 'odoo8-addon-import-odbc' error? Thanks   
jdbc,odbc,MySQL,swing - Java Beginners
jdbc,odbc,MySQL,swing  write a code that displays a menu list of all available database drivers in a window,and allows the user to select any driver from this list and execute any query (within a text field)related
Connection pooling
Connection pooling  What is Connection pooling
jdbc odbc
jdbc odbc
connection closing
connection closing  hello, what happens if connection is not closed
server database connection - JSP-Servlet
"); 2.Connection con=DriverManager.getConnection("jdbc:odbc:Driver={Microsoft ODBC For Oracle}","scott","tiger"); But how to get the connection from..." in that case how we will get the database connection   Hi Friend
Connect to MS Acces wothout using ODBC but JDBC - JDBC
Connect to MS Acces wothout using ODBC but JDBC  Hi, I want to connect my MS Access using JDBC but not ODBC. Please help me out. Thanks
ODBC driver manager return 'Data source name not found.
ODBC driver manager return 'Data source name not found.  Why does the ODBC driver manager return 'Data source name not found and no default driver specified Vendor: 0
ModuleNotFoundError: No module named 'odoo10-addon-base-external-dbsource-odbc'
ModuleNotFoundError: No module named 'odoo10-addon-base-external-dbsource-odbc...: ModuleNotFoundError: No module named 'odoo10-addon-base-external-dbsource-odbc' How...-external-dbsource-odbc' error? Thanks   Hi, In your python
Connection pooling
Connection pooling  hii, What is Connection pooling?   hello,ADS_TO_REPLACE_1 Connection pooling is a technique used for sharing server resources among requesting clients. Connection pooling increases
Sun's JDBC-ODBC driver does not implement the getPrimaryKeys() method for the DatabaseMetaData Objects.
Sun's JDBC-ODBC driver does not implement the getPrimaryKeys() method for the DatabaseMetaData Objects.  Is there a way to find the primary key(s) for an Access Database table? Sun's JDBC-ODBC driver does not implement
connection with database - JSP-Servlet
connection with database  I tried the DSN and connection... { Connection con=null; Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); con=DriverManager.getConnection("jdbc:odbc:soni
DataBase Connection
DataBase Connection  How to connect java and Oracle 10g? Tell me Jdbc connection
connection - JNDI
connection   Hi, i am getting this error,can any one know pls give me reply org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot get a connection, pool exhausted  Hi friend, Plz give full details with source
Understanding Connection Object
Understanding Connection Object       A Connection object represents a connection with a database. When we connect to a database by using connection method, we create
Error while SQL Server connection to Java
Error while SQL Server connection to Java  import java.sql.*; public... Exeption { Connection con=null; try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); con=DriverManager.getConnection("jdbc:odbc:SQL_SERVER;user=DTHOTA;password
Error while SQL Server connection to Java
Error while SQL Server connection to Java  import java.sql.*; public... Exeption { Connection con=null; try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); con=DriverManager.getConnection("jdbc:odbc:SQL_SERVER;user=DTHOTA;password
connection - SQL
connection  how can i establish connection between netbean_ide6.9 with mysql or oracle  Hi Friend, Please visit the following link: http://www.roseindia.net/jsf/visual-jsf.shtml Hope that it will be helpful
Connection pooling
Connection pooling  Sir, In my project i want to implement connection pooling with ms-sql server 2005. i wrote the code in JSP like this... ADS_TO_REPLACE_1 <% Connection con=DbCon.getConnection

Ads