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 many jdbc driver types are there?

928


What is drivermanager in jdbc?

977


Why do we need jdbc api?

985


When does the result for an sql statement return null?

930


Result set’s index starts with 0 or 1?

1055


What is while rs next ())?

955


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

971


What is in terms of jdbc a datasource?

1081


Why do we need a jdbcrowset like wrapper around resultset?

1259


How does a file store compare with a jdbc store?

1212


What are the components of jdbc?

991


What is the reason why we need a jdbcrowset like the wrapper around resultset?

977


What are common JDBC Exceptions?

990


Which database is used for java?

966


How can we retrieve the file in the oracle database?

971