ODBC connection

Ads
 

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

Ads









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       JDBC-ODBC Connection is a JDBC driver that translates the operation... in explaining JDBC Odbc Connection in Java. The code explains you a how creation
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. JDBC ODBC Connection To Connect the JDBC and ODBC
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
; 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: .... Connection from database is created using odbc_connect() and query "
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
connection
connection   how to make multiple database connection using jdbc
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
{ 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
Java JDBC ODBC
Java JDBC ODBC  What is the difference between JDBC and ODBC
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 Connectivity
JDBC-ODBC Connectivity       The code illustrates an example from JDBC-ODBC... an object of connection class. This method is used to built a 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   
DataBase Connection
DataBase Connection  How to connect java and Oracle 10g? Tell me Jdbc connection
connection
connection
connection
Connection to Database
Connection to Database  Hello, I have a website with more than 50.... However, most of times my web pages displays the error message" Too many Connection... and viewing hundreds of pages, I wont get any connection error and the truth
jdbc connection
{ Class.forName("com.mysql.jdbc.Driver"); Connection con = (Connection..."); Connection con = (Connection) DriverManager.getConnection("jdbc:mysql://127.0.0.1
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 in php
connection in php  <?php include("include/db.php"); ?> <html> <head> <title>Mann Jewellary</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <

Ads