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
Compare jdbc and odbc and how is jdbc required in this context.
What is JDBC Connection? Explain steps to get Database connection in a simple java program.
What is difference between java.util.Date and java.sql.Date?
There is a method getColumnCount in the JDBC API. Is there a similar method to find the number of rows in a result set?
Differentiate between a statement and a preparedstatement.
What is encrypted connection?
What is executequery in java?
What is jdbc driver in java?
What do you mean by two phase commits?
What is resultset in jdbc with example?
What is jdbc and jpa?
What is the role of class.forname while loading drivers?
Explain how data flows from view to db and reverse
Is there another way of dealing with the result set that could execute faster?
How do I set properties for a JDBC driver and where are the properties stored?