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



Home Answers Viewqa JDBC i have installed oracle 10g (both ee and xe) editions... while am installing i found port num as 1521 for ee, 1522 for xe

Have Programming Question? Ask it here!
 
 
 


kalyanitokuri
i have installed oracle 10g (both ee and xe) editions... while am installing i found port num as 1521 for ee, 1522 for xe
0 Answer(s)      3 years and a month ago
Posted in : JDBC


i have installed oracle 10g (both ee and xe) editions... while am installing i found port num as 1521 for ee, 1522 for xe.... and my program is......
import java.sql.*;
import java.io.*;
public class DBConnect{
public static void main(String ar[])throws SQLException{
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
System.out.println("driver is registered");
Connection con=
DriverManager.getConnection("jdbc:oracle:thin:@localhost:1522:xe","lms","xyz");
System.out.println(con);
System.out.println("connection is established");
Statement stmt=con.createStatement();
ResultSet rs=stmt.executeQuery("insert into emp values(3,'c')");
while(rs.next()){
int eno=rs.getInt("eno");
System.out.println(eno);
String name=rs.getString("name");
System.out.println(name); 
}
}
}...... while i run this prog.... i got error like
driver is registered
oracle.jdbc.driver.T4CConnection@929206
connection is established
Exception in thread "main" java.sql.SQLException: ORA-00942: table or view does
not exist

        at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java
:112)
        at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
        at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
        at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:743)
        at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:207)
        at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:946)

        at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStateme
nt.java:1169)
        at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:
1273)
        at DBConnect.main(DBConnect.java:12)

E:\jdbcex> 
and in sql i have create user lms and, table emp(eno, name).
please tell me wts the resolution for this problem....

Advertisement
View Answers

Related Tutorials/Questions & Answers:
i have installed oracle 10g (both ee and xe) editions... while am installing i found port num as 1521 for ee, 1522 for xe
i have installed oracle 10g (both ee and xe) editions... while am installing i found port num as 1521 for ee, 1522 for xe  i have installed oracle 10g (both ee and xe) editions... while am installing i found port num as 1521
i am getting the problem when i am downloading the pdf file from oracle 10g database - Struts
i am getting the problem when i am downloading the pdf file from oracle 10g database  if i created the pdf file from pdf machine,it is storing into datbase and download the pdf file from database. but when i created the pdf file
Advertisements
i need a school appication using struts frame work with oracle 10g using myeclipse6.0
i need a school appication using struts frame work with oracle 10g using myeclipse6.0   hi i need a school apllication using struts frame work backend 10g xe using myeclipse 6.0
hi .. need help ASAP ..i have a project buit in eclipse , i have installed jasper. i want the steps to work on it ..
hi .. need help ASAP ..i have a project buit in eclipse , i have installed jasper. i want the steps to work on it ..   hi .. need help ASAP ..i have a project buit in eclipse , i have installed jasper. i want the steps to work
prablems on oracle ee installation in windows7 ultimate(32 bit).
prablems on oracle ee installation in windows7 ultimate(32 bit).  Hai i have face several prablems when ever i m install oracle ee in my system(32 bit)windows7 ultimate.it is not installed in my system.can any body help me how
i have got error while compiling simple tag handler
i have got error while compiling simple tag handler   javac.servlet.jsp not found! tell me what are the jar files required to run simple tag handler class   The package you have used javac.servlet.jsp does not exist
I am getting this exception
I am getting this exception   Exception in thread "main" org.hibernate.exception.GenericJDBCException: Cannot open connection at org.hibernate.exception.ErrorCodeConverter.handledNonSpecificException(ErrorCodeConverter.java
Am using windows xp os..how to install wamp server for this os ?i have a trouble in this..
Am using windows xp os..how to install wamp server for this os ?i have a trouble in this..  i installed wamp server . i was put my wampserver is online.. but i cant open phpmyadmin in my browser. i dont know the reason.. pls
tables in oracle 10g
tables in oracle 10g  sir i have created a table in oracle 10g,i want to know where this table is stored and how can i move this table to another pc and insert values
i have problem with classnofounderror
i have problem with classnofounderror   import java.sql.*; public... = DriverManager.getConnection("jdbc:oracle:thin:@localhost:8080:oracle", "System", "manager... student"); while(rs.next()) System.out.println
i have problem with classnofounderror
i have problem with classnofounderror   import java.sql.*; public... = DriverManager.getConnection("jdbc:oracle:thin:@localhost:8080:oracle", "System", "manager... student"); while(rs.next()) System.out.println
android connection to database oracle 10g
android connection to database oracle 10g  Hello, How i can connect my android application to my oracle 10g database
:( I am not getting Problem (RMI)
I am not getting Problem (RMI)  When i am excuting RMI EXAMPLE 3,2 I am getting error daying nested exception and Connect Exception  
I have crude application
I have crude application   I have crude application, how to load into this roseindia.net
Am i convetrting the code right ? - Java Beginners
(PortInUseException ex) { } I have a device on the serial port which has a led on it. The LED blinks on the C#'s code. I think the code i have written...Am i convetrting the code right ?  C# private void button
I have need to help
I have need to help  Write a program that, for four points A, B, C and P, draws a triangle formed by ABC and a small cross showing the position of P; and displays a line of text indicating which of the following three cases
I am getting error.How can i get details
I am getting error.How can i get details  Exception in thread "main" java.sql.SQLException: Listener refused the connecti n with the following error... descrip or The Connection descriptor used by the client was: Localhost:1521:orcl
Tomcat not supporting Oracle 10g - WebSevices
Tomcat not supporting Oracle 10g  While Starting my Tomcat Server am... of Oracle version(Oracle 8i to Oracle10g). SEVERE: End event threw exception... time=16/47 config=C:\Tomcat 4.1\bin\..\conf\jk2.properties
I am from .net background, I want to learn SOA.
I am from .net background, I want to learn SOA.  Hi I am from .net background, I want to learn SOA. Could it possible for me to learn SOA, I suppose SOA includes Java. I dont have knowledge of java. Please help Thanks  
i am Getting Some errors in Struts - Struts
i am Getting Some errors in Struts   I am Learning Struts Basics,I am Trying examples do in this Site Examples.i am getting lot of errors.Please Help me
what is difference b/w oracle 8i, 9i and 10g
what is difference b/w oracle 8i, 9i and 10g  what are the difference between oracle 8i,9i and 10g? I am not considering the versions and their supported os, in the interview point of view
i am getting multiple values in listbox
i am getting multiple values in listbox   hi sir, i am using... table group by stuname) order by a.name in a subquery multiple recdates i am getting its working fine, but in main query also i am getting multiple name
instruction to install oracle 10g in linux....
instruction to install oracle 10g in linux....  how to install oracle 10g in linux
i am unable to identify the error in my code
i am unable to identify the error in my code  class Program { public static void main(String[] args) { BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); System.out.println("enter
i am unable to identify the error in my code
i am unable to identify the error in my code  class Program { public static void main(String[] args) { BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); System.out.println("enter
Not sure what I am missing ? Any ideas?
Not sure what I am missing ? Any ideas?  import java.util.*; public...) { if(str.length()==0) return false; for(int i=0;i<str.length();i++) if (c==str.charAt(i)); return true
i have problem in that program - JavaMail
i have problem in that program  1. Write a multi-threaded Java program to print all numbers below 100,000 that are both prime and fibonacci number... read both the pipes to identify numbers common to both.. 2. Develop
I need Oracle connector jar file. where will i download?
I need Oracle connector jar file. where will i download?  I need Oracle connector jar file. where will i download
oracle problem
oracle problem  Hi I have installed oracleXE on my system and for reasons i've uninstalled them and am not able to stop oracle xe services and i could'nt reinstall it. I couldnt reinstall my os for this as it is in my office
Hi ..I am Sakthi.. - Java Beginners
Hi ..I am Sakthi..  can u tell me Some of the packages n Sub Directories starts with... import javax.swing.*; import javax._________;   http://www.cs.ubc.ca/local/computing/software/j2sdk-1.4.2/docs/api/overview
I don't found in Tomcat 7.0 's bin folder..
I don't found in Tomcat 7.0 's bin folder..  While making servlet using tomcat 7.0, i don't find startup.bat file in bin folder. My servlet... know how to run my servlet even i am following all the steps
I have problem in my Project
I have problem in my Project  Dear Sir, i have problem in my project about Jtable i have EDIT JButton whenevery i was click on edit he is display all data from database but i want to select any row
i have a problem in spring - Spring
i have a problem in spring  spring Aop: how to configure proxyfactorybean in xml file for providing advices for one particular class
I have doubt in jsp file.
I have doubt in jsp file.  I have doubt in jsp file. In a jsp file, there should be two buttons. One is start and other is stop. When we click on start then only stop should be enabled. Other wise it should be disabled. When
how to display output on jsp from while loop of action class....actually i am retreiving the post from posts column from my sql.plz help.thnkss
how to display output on jsp from while loop of action class....actually i am retreiving the post from posts column from my sql.plz help.thnkss  how to display output on jsp from while loop of action class....actually i am
I am new to programming and I am not sure what to do next? Any ideas?
I am new to programming and I am not sure what to do next? Any ideas? ...()==0) return false; for(int i=0;i<=str.length();i++) if (c==str.charAt(i)); return true; } // If userInputs
The app was not installed on iphone because its resources have been modified
The app was not installed on iphone because its resources have been modified  Hi, I am getting following error while my client is installing my AdHoc build on his iPhone: "The app was not installed on iphone because its
Insert or retrieve image into oracle 10g by using java
Insert or retrieve image into oracle 10g by using java   How can i insert or retrieve image into oracle10g using java plz i need it urgently,need guidance to do this plz
storing date from html form to oracle 10g using servlet
storing date from html form to oracle 10g using servlet  i have... this date month year from html form into oracle 10g database where i have..."); con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:XE","ORS
i got an error while compile this program manually.
i got an error while compile this program manually.  import... mapping.findForward("errors.jsp"); } } i set both servlet,struts jar files and i got an error in saveErrors() error Heading cannot find
Can you see what i have done because i did it but i still have problem - SQL
Can you see what i have done because i did it but i still have problem  This is what i have done but i still have a problem:- Can you correct my mistakes? ------------------------------------------------------- create database
storing date from html form to oracle 10g using servlet
storing date from html form to oracle 10g using servlet  i have... this date month year from html form into oracle 10g database where i have..."); con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:XE","ORS
I am having problem with configuring Hibernate sessionfactory. Please Help
I am having problem with configuring Hibernate sessionfactory. Please Help  Sir, I am having problem with configuring Hibernate sessionfactory.. I was using the old version of Hibernate before now I am using Hibernate 4
I am not able to display the selected value of my combobox
I am not able to display the selected value of my combobox   <... units order by unitcode"; $rsrcResult = mysql_query($strQuery); $i=1; $select='<select size=1 name="unitcode">'; while($arrayRow = mysql_fetch
can i know the error in this code... am unable to run this code
can i know the error in this code... am unable to run this code  ...}; int n=arr.lenght; System.out.println("length of array:"+n); for(int i=0;i System.out.println(arr[i]); } }   You have used incorrect symbol in your
I am trying to create domains for column attributes of my data dictionary?
I am trying to create domains for column attributes of my data dictionary?  Please provide me with the best possible solution. I already have... are shared by different fields and also some of the field values have been coded
i got an exception while accept to a jsp
i got an exception while accept to a jsp  type Exception report... properties file in c drive. Have a look at the following link: Visit Here  ... in a file.later i changed it to ANSII problem is resolved
i am getting an error in adding a menu item to a menu.
i am getting an error in adding a menu item to a menu.   i am not able to execute the menu program. i am getting an error at menu.add(menuitem); it says add method is undefined for type menu. but as far as i know that is only way
i am inserting an image into database but it is showing relative path not absolute path
i am inserting an image into database but it is showing relative path...=DriverManager.getConnection("jdbc:oracle:thin:scott/tiger@//localhost:1521/XE","scott","tiger..."); } catch(Exception e) { System.out.println(e); } %> when i compiled it i
i am inserting an image into database but it is showing relative path not absolute path
i am inserting an image into database but it is showing relative path...=DriverManager.getConnection("jdbc:oracle:thin:scott/tiger@//localhost:1521/XE","scott","tiger..."); } catch(Exception e) { System.out.println(e); } %> when i compiled it i
Advertisements
 

 

 

DMCA.com