Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa JDBC steps required to execute a query in JDBC

Have Programming Question? Ask it here!
 
 
 


Clark
steps required to execute a query in JDBC
2 Answer(s)      3 years and 9 months ago
Posted in : JDBC


What are the steps required to execute a query in JDBC?


Advertisement
View Answers

November 9, 2010 at 5:30 PM


  1. create an instance of a JDBC driver or load JDBC drivers,
  2. register driver with DriverManager class.
  3. open a connection.
  4. create a statement
  5. execute the query.


November 12, 2010 at 11:36 AM


Hi friends,

The steps requires to execute a query in JDBC.

1 : First of all, we need to create an instance of a JDBC driver or load JDBC drivers.
2 : In the second step, we need to register the driver with DriverManager class.
3 : In this step, open the connection.
4 : With the help of this connection , creates a statement object.
5 : Execute the SQL queries.
6 : Close connection.

Thanks.



Related Tutorials/Questions & Answers:
steps required to execute a query in JDBC
steps required to execute a query in JDBC  What are the steps required to execute a query in JDBC
JDBC Execute Query
JDBC Execute Query       The  Execute Query in JDBC retrieve the elements from a database. In this Tutorial we want to describe you a code that helps you to understand JDBC Execute Query
Advertisements
query in JDBC
query in JDBC  What are the steps required to execute a query in JDBC
what are the steps in jdbc?
what are the steps in jdbc?  what are the steps in jdbc
JDBC Execute Update Example
JDBC Execute Update Example       JDBC Execute Update query is used to modify or return you an integer value specify... a simple example from JDBC Execute update Example. In this Tutorial we want
JDBC Steps ? Basic steps in writing a JDBC Application
JDBC Steps – Basic steps in writing a JDBC Application... you brief description of JDBC Steps for making connection with the database.... Here are the JDBC Steps to be followed while writing JDBC program
HQL Query in execute method of Struts2
HQL Query in execute method of Struts2  I am making login page... data from database using hql. And where I need to write the hql query. Is it possible to write it at execute method of struts2
jdbc query
jdbc query  write a query of how to print the values of any column present in database in reverse order
JDBC Execute Statement
JDBC Execute Statement       JDBC Execute Statement is used to execute SQL Statement, The Execute... a database. In this Tutorial, the code illustrates an example from JDBC Execute
Query On JDBC - JDBC
Query On JDBC  Hello , I am trying to migrate from xls TO mysql in Linux platform.. I'm using JDBC ODBC Bridge Driver..String url = "jdbc:excel:./personal1.xls";System.out.println
jdbc query
jdbc query  hello sir I have used your simple bank application project in my project to display transaction details but i am using ms access data base but when i am trying to display transaction details i will show the datatype
jdbc query
jdbc query  hello sir I have used your simple bank application project in my project to display transaction details but i am using ms access data base but when i am trying to display transaction details i will show the datatype
jdbc query
jdbc query  hello sir I have used your simple bank application project in my project to display transaction details but i am using ms access data base but when i am trying to display transaction details i will show the datatype
jdbc query
jdbc query  hello sir I have used your simple bank application project in my project to display transaction details but i am using ms access data base but when i am trying to display transaction details i will show the datatype
could not execute native bulk manipulation query
could not execute native bulk manipulation query  I am insert data... public ActionForward execute(ActionMapping mapping, ActionForm form... = "insert into emp values(?,?,?,?,?)"; SQLQuery query
JDBC connection and SQL Query - JDBC
each time. Now I'm trying to execute a query to insert those values into an oracle...JDBC connection and SQL Query  Hi, I'm reading a all files one... variables. I'm trying to execute following command. Though I use executeQuery
Query regarding JSP, JDBC
Query regarding JSP, JDBC  can I get the code for the question asked by me regarding JSP,JDBC
How to execute mysql query based on checkboxes values in java swing application.
How to execute mysql query based on checkboxes values in java swing... have to execute query based on selection of checkboxes.Means I have to to execute query acording to the checkbox. whichever checkbox is selected query should
How to execute mysql query based on checkboxes values in java swing application.
How to execute mysql query based on checkboxes values in java swing... have to execute query based on selection of checkboxes.Means I have to to execute query acording to the checkbox. whichever checkbox is selected query should
How to execute mysql query based on checkboxes values in java swing application.
How to execute mysql query based on checkboxes values in java swing... have to execute query based on selection of checkboxes.Means I have to to execute query acording to the checkbox. whichever checkbox is selected query should
JDBC related query
JDBC related query  How to merge two resultset of two different queries, wherein both the resultset(after query execution)gives an integer value as its column
The required JDBC drivers to establish connectivity to my database part of the JDK.
The required JDBC drivers to establish connectivity to my database part of the JDK.  Are all the required JDBC drivers to establish connectivity to my database part of the JDK
Execute database query by using sql tag of JSTL SQL library
Execute database query by using sql tag of JSTL SQL library... to create application that execute sql query given by user using JSTL SQL Library. To execute query first create a data source and then execute sql query
sql query - JDBC
sql query  I need a SQL query to add data into database
SQL QUERY - JDBC
SQL QUERY  I m running a query using apache tomcat the sql query is on adding an employee in the database whenever i click on add after inserting the values i am getting a java.lang.nullpointer exception
use JDBC to execute non-standard features that my DBMS provides.
use JDBC to execute non-standard features that my DBMS provides.  Can I use JDBC to execute non-standard features that my DBMS provides
How to execute my query fast..When A date filter is there in a query it takes more time for execution.?
How to execute my query fast..When A date filter is there in a query it takes more time for execution.?  When A date filter is there in a query... in 30 seconds with 5000 records... what is the problem ... how to execute my query
Query regarding JSP, JDBC
Query regarding JSP, JDBC  I have a table in SQL Server database storing some ids and names. In my jsp code a while loop is displaying the list... by running a query through the id corresponding the name using arraylist
query related to jdbc
query related to jdbc  hello, i have done my database connection successfully ie db2 with RAD. but while running my application i am not able to fetch the data so please suggest and help me
What is the return type of execute mehtod in jdbc - Java Beginners
. My interview asked wat is return type of execute() in jdbc . should...What is the return type of execute mehtod in jdbc  Hi Deepak, u... java.sql.Statement or java.sql.PreparedStatement or java.sql.CallableStatement, the execute
JDBC- SQL spatio-temporal query
JDBC- SQL spatio-temporal query  Any one give me a JDBC sql query for my spatio temporal query? Trajectory table OBJID PLACE 7 H 8 Q 9 W 10... as shown in above. I want a spatio-temporal query using JDBC-SQL to retrieve
JDBC- SQL spatio-temporal query
JDBC- SQL spatio-temporal query  Any one give me a JDBC sql query for my spatio temporal query? Trajectory table OBJID PLACE 7 H 8 Q 9 W 10... as shown in above. I want a spatio-temporal query using JDBC-SQL to retrieve
JDBC Components
JDBC Components    Jdbc has following components-- 1.  JDBC API      Using  JDBC API ,frontend java applications can execute query and fetch data from connected database. JDBC API can also
How to connect to MySql Database from Servlet?
will learn the JDBC steps necessary to connect to the MySQL Database and execute the query.  Here we are using the MySQL jdbc driver for making the connection. You can download the jdbc driver for MySQL from http://dev.mysql.com
hi, Everyone ,i'm learning jdbc, i got an nullpointerexception when execute this program.
hi, Everyone ,i'm learning jdbc, i got an nullpointerexception when execute this program.   ConnectionProvider.java import java.util.*; import... class=oracle.jdbc.driver.OracleDriver url=jdbc:oracle:thin:@localhost:1521:xe user
Java Multiple Insert Query
to execute multiple insert query in Java. This example explains you about how to execute batch insert in Java. This example explains all the steps for executing... example that demonstrates how to execute the multiple sql insert query in JSP
MySQL PHP Query delete
MySQL PHP Query delete       Mysql PHP Query delete is used to execute Mysql function...' that has the required fieldnames and datatypes respectively. Query for creating
code required.!
Java Script phone number entered by person should be in numeric only. code required!  i am using javascript coding on jsp page. i want that the phone number entered by person should be in numeric only..can i get code
Steps not found.
Steps not found.  import java.io.*; import java.net.*; import javax.servlet.*; import javax.servlet.http.*; public class Details1 extends HttpServlet { protected void doGet(HttpServletRequest request, HttpServletResponse
can i insert values into two tables by a query - JDBC
can i insert values into two tables by a query  hi all, can i insert values into two tables by a query Thanks Bala k
PHP SQL Query Insert
PHP SQL Query Insert       This example illustrates how to execute insert query in php...). Now, queries can be executed using mysql_query() method to insert values
jdbc
jdbc  Hai , Give a steps for jdbc connectivity
Php Sql Query Insert
Php Sql Query Insert  This example illustrates how to execute insert query with values in php application. In this example we create two mysql query...; mysql_query("INSERT INTO users (username, password
PHP SQL Query Where Clause
PHP SQL Query Where Clause       This example illustrates how to create and execute the sql query with where clause. To understand how to display the result returned 
MySQL PHP Query delete
MySQL PHP Query delete       Mysql PHP Query delete is used to execute Mysql function...' that has the required fieldnames and datatypes respectively. Query for creating
Executing Prepared Statement
-compiled query with parameter and no-parameter. An example given below... = "com.mysql.jdbc.Driver"; String connectionUrl = "jdbc:mysql://localhost... a query String query = "SELECT * FROM student"; try { // Compiling query
property datasource required - Spring
datasource required. This is my dispatcher-servlet.xml... the following link: http://www.roseindia.net/spring/jdbc-template-batch-update.shtml
Steps for the payment gateway processing?
Steps for the payment gateway processing?  Steps for the payment gateway processing
query
("com.mysql.jdbc.Driver").newInstance(); conn = DriverManager.getConnection("jdbc...("com.mysql.jdbc.Driver").newInstance(); conn = DriverManager.getConnection("jdbc
Basic Steps to Outsourcing Success, Steps to Success in Outsourcing
Basic Steps to Outsourcing Success Introduction There are a few fundamental steps to ensure the best results for your outsourcing venture. These strategies... the decision making process in-house, these are the steps that need to be followed
Advertisements
 

 

 

DMCA.com