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
What does the connection object represents?
What port does jdbc use?
There is a method getColumnCount in the JDBC API. Is there a similar method to find the number of rows in a result set?
What are the methods which can verify the cursor particular position?
What is the use of the statement in jdbc?
What are JDBC Best Practices?
Which interface handles transaction management in jdbc?
How can you use preparedstatement in jdbc?
What is jdbc in java?
What is the role of jdbc drivermanager class?
What are the functions of the jdbc connection interface?
Is jdbc a middleware?
Is jdbc a protocol?
What is the use of dialect?
What is jdbc connection string?