Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

How do I stop nullpointerexception?

951


What are the advantages of collection pools?

1025


How to set NULL values in JDBC PreparedStatement?

969


How can we retrieve the file in the oracle database?

955


Why is odbc needed?

893


How does JDBC API helps us in achieving loose coupling between Java Program and JDBC Drivers API?

1065


How do we load the drivers?

985


Where can I find ojdbc14 jar file?

977


What are the different types of lockings in jdbc?

907


How can I get information about foreign keys used in a table?

951


Explain the difference between resultset and rowset in jdbc

985


What is resultset?

975


What protocol does jdbc use?

953


Explain what should be done when a SQL exception is raised?

962


What is the advantage of namedparameterjdbctemplate?

948