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...


What are the steps in the jdbc connection?



What are the steps in the jdbc connection?..

Answer / Mayank Vishnoi

"1. Load the JDBC driver for the database you are using (using Class.forName()).n2. Establish a connection to the database by calling DriverManager.getConnection(). This method requires a URL, username and password as arguments.n3. Create a Statement object, which represents a SQL statement that will be executed on the database.n4. Execute the SQL query using the execute() method of the Statement object.n5. Process the results returned from the execution using appropriate methods like getInt(), getString(), etc.n6. Close all the resources (Connection, Statement and ResultSet) to free up database connections for other applications."

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

What is java instanceof operator?

1 Answers  


What is the core java?

1 Answers  


Is java ee a framework?

1 Answers  


suppose in a class there is a code like this: { Set hs=new Hashset(); hs.add(new Emp("kathy",1000)); hs.add(new Emp("kathy",2000)); } how can u avoid the above code in your class as set won't allow duplicate objects?

3 Answers  


What is finally in exception handling?

7 Answers  


Explain reverse a linked list iterative solution in java?

1 Answers  


Is boolean a data type in java?

1 Answers  


in a console we r giving java <class name> if r pressing enter where it'll goes

2 Answers   CSC,


How to prevent to create multiple objects of a java class?

3 Answers   ASD Lab, TCS,


How many threads does a core java have?

1 Answers  


What is the purpose of static keyword in java?

1 Answers  


When should the method invokelater() be used?

1 Answers  


Categories