Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Beginners connectivity problem
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


deepu kumar
connectivity problem
0 Answer(s)      2 years and 3 months ago
Posted in : Java Beginners


i am facing error in Class.for name statement please help me correct it the error is ""java.lang.ClassNotFoundException: oracle.jdbc.OracleDriver"" i am using this with netbeans since i have gain connectivity still i am facing this error*

================================oracle connectivity program============================

import java.sql.*;
import java.util.*;

class Test
{
static
{
     try{
    Class.forName("oracle.jdbc.OracleDriver");
    }
      catch(Exception err)
    {
            System.out.println("error..........."+err);
    }
}
public static void main(String []args)
    {

try{
        Scanner s=new Scanner(System.in);
        System.out.println("enter ename");
        String ename=s.next();
        System.out.println("enter eid");
        String eid=s.next();
        Connection con=DriverManager.getConnection("jdbc:oracle:thin:@127.0.0.1:1521:XE","HR","HR");
        PreparedStatement st=con.prepareStatement("update t1 set ename=? where eid=?");
        st.setString(1,ename);
        st.setString(2,eid);
        st.executeUpdate();
System.out.println("record updated");

    }
catch(Exception err)
{
System.out.println(err);
}
    }

}

Advertisement
View Answers

Related Tutorials/Questions & Answers:
connectivity problem
connectivity problem  i am facing error in Class.for name statement... connectivity still i am facing this error* ================================oracle connectivity program============================ import java.sql.*; import
oracle connectivity problem with netbeans
oracle connectivity problem with netbeans  sir I am using oracle.... for this after adding new driver(ojdbc6.jar) in services tab I got connectivity with oracle... of simple connectivity with oracle in this I am giving driver details
Advertisements
database connectivity problem
database connectivity problem  what if client dont have database with them then what is other way to run successfully our programm   Please visit the following link: http://www.roseindia.net/jdbc
jdbc oracle connectivity problem
jdbc oracle connectivity problem  Hi All, I am trying to connect my swing application to oracle DB . but class.forname is giving error. Please suggest me if there is some different way to connect swing application to oracle
java servlet connectivity problem with access
java servlet connectivity problem with access  Import java.sql javax.servlet //all packages entered try { Class.forName...=con.createStatement(); ^ i am confused what is the problem
how to solve this problem for oracle connectivity
how to solve this problem for oracle connectivity  Exception in thread "main" java.sql.SQLException: Io exception: The Network Adap ter could not establish the connection
**Connectivity is not getting done in this program plz check it out wat is the problem with that Although i've made tables in MA-ACCESS**
**Connectivity is not getting done in this program plz check it out wat is the problem with that Although i've made tables in MA-ACCESS**  <p>import java.io.*; import java.awt.*; import java.awt.event.*; import
database connectivity
database connectivity  how to create database connectivity between HTML and sql server2005
database connectivity
database connectivity  describe java program steps in order to get connectivity to database along with example
connectivity with php
connectivity with php  i have make one html form and doing connectivity with php database but when i click on submit button on html form display all coding in php form about connectivity instead of adding data, i used in html
java connectivity
java connectivity  hi........ Can u help me to do connectivity between java and weka??????? weka is a data mining tool which allows to do prediction, classification etc.... i want to do connectivity between weka and java can u
JDBC CONNECTIVITY
execution finished."""""") what may the problem?   Java Mysql connectivity Other JDBC Tutorials
Java connectivity with MySQL
Java connectivity with MySQL  Java connectivity with MySQL
connectivity with mysql
connectivity with mysql  if this code of roseindia doesnt work,then what to do..cant connect with my sql http://www.roseindia.net/tutorial/php/phpdatabase/Check-PHP-MySQL-Connectivity.html   Please visit the following
JDBC CONNECTIVITY
file in environment variable.   Java Mysql connectivity Other JDBC
connectivity with access
connectivity with access  how to connect with data base with access sheet. in my application form there is two JTextArea and Two JComboBox.   Is this Access database or excel sheet. Do you want to display the values
java connectivity
java connectivity  i am trying to add dyanamic rows in the jsp page, when i add the new row the dropdown control value is not coming from database..please help me to overcome this problem
connectivity step
connectivity step  sir.pls give me step one by one for connect the java program to oracle.   Follow these steps: 1) Import the following packages in your java file:*** import java.sql.*; import oracle.jdbc.driver.
in connectivity - Hibernate
insertted  Hi friend, This is connectivity and hibernate configuration
DB connectivity - EJB
DB connectivity  DB connectivity
Database Connectivity
for:com.ddtek.jdbcx.sqlserver.SQLServerDataSource" how to resolve this problem
connectivity - JDBC
driver for JDBC and set in the Tomcat/lib folder and if any more problem give full.../lib folder and if any more problem give full source details and source code
Oracle Database connectivity probem
Oracle Database connectivity probem  hi Below is the code of oracle database connectivity, when i compile it, it will show the error... am trying to solve the problem from last three to four week but still not success
sql connectivity through java
sql connectivity through java  i want an example for java db through sql connection. Thanks in advance
Validate telnet connectivity
Validate telnet connectivity  How to validate telnet connectivity in my java code
jdbc connectivity to mysql tutorial
jdbc connectivity to mysql tutorial  here is complete jdbc connectivity to mysql tutorial for newbies. Person who don't even know how to install mysql and don't know about which driver to use can do with ease
J2ME connectivity to ms access
J2ME connectivity to ms access  How to establish client server connectivity to access ms access database on the server side? I have made the odbc connection. Plz help me in the coding part.. Dont know how to start
Connectivity with sql in detail - JDBC
Connectivity with sql in detail  Sir/Madam, I am unable to connect the sql with Java. Please tell me in detail that how to connect. Thankyou
 

 

 

DMCA.com