how can connection with oracle10g with java
Answer Posted / rajshri
try
{
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection con=DriverManager.getConnection
("jdbc:oracle:thin:@localhost:1521:XE", "system", "system");
//(system,system is username and passward of oracle 10g)
Statement st=con.createStatement();
String sql="(here your sql statement must be of select
pattern)";
ResultSet rs=st.executeQuery(sql);
while(rs.next())
{
AND SO ON...
| Is This Answer Correct ? | 33 Yes | 4 No |
Post New Answer View All Answers
How do I stop nullpointerexception?
What are the advantages of collection pools?
How to set NULL values in JDBC PreparedStatement?
How can we retrieve the file in the oracle database?
Why is odbc needed?
How does JDBC API helps us in achieving loose coupling between Java Program and JDBC Drivers API?
How do we load the drivers?
Where can I find ojdbc14 jar file?
What are the different types of lockings in jdbc?
How can I get information about foreign keys used in a table?
Explain the difference between resultset and rowset in jdbc
What is resultset?
What protocol does jdbc use?
Explain what should be done when a SQL exception is raised?
What is the advantage of namedparameterjdbctemplate?