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

Compare jdbc and odbc and how is jdbc required in this context.

869


What is JDBC Connection? Explain steps to get Database connection in a simple java program.

1080


What is difference between java.util.Date and java.sql.Date?

1020


There is a method getColumnCount in the JDBC API. Is there a similar method to find the number of rows in a result set?

993


Differentiate between a statement and a preparedstatement.

928


What is encrypted connection?

957


What is executequery in java?

837


What is jdbc driver in java?

878


What do you mean by two phase commits?

987


What is resultset in jdbc with example?

867


What is jdbc and jpa?

913


What is the role of class.forname while loading drivers?

939


Explain how data flows from view to db and reverse

1979


Is there another way of dealing with the result set that could execute faster?

960


How do I set properties for a JDBC driver and where are the properties stored?

900