Basic Database connection and run querry.

Hi, I pretty new to java, So if any can help, please do.
All i want to do is connect to a sql database and run a querry, return the results and then output them as XML.
I have no idea where to start!
Please Help.

JDBC resources:
http://java.sun.com/products/jdbc/download.html
http://java.sun.com/docs/books/tutorial/jdbc/basics/
http://developer.java.sun.com/developer/technicalArticles/Database/dukesbakery/
http://developer.java.sun.com/developer/onlineTraining/Database/JDBC20Intro/JDBC20.html#JDBC209_1
XML resources:
http://wwws.sun.com/software/xml/
http://java.sun.com/xml/
http://developer.java.sun.com/developer/codesamples/xml.html
http://developer.java.sun.com/developer/technicalArticles/xml/JavaTechandXML/
These may give you a start.
You can use the advanced search across the user forums or the Sun site to find many more examples and problem solutions.
Also the google search engine is very good for searching the web for java information.
rykk

Similar Messages

  • How to using sqlplus to connect and run command ?

    Hello,i have a small problem please help me
    I want to use sqlplus to connect and run command
    for example : sqlplus test/test@DB select sysdate from dual ;
    and then it will show data (sysdate) to screen
    what should i do ?
    Thanks

    kenshin19xx wrote:
    Hello,i have a small problem please help me
    I want to use sqlplus to connect and run command
    for example : sqlplus test/test@DB select sysdate from dual ;
    and then it will show data (sysdate) to screen
    what should i do ?
    Thanks
    bcm@bcm-laptop:~$ echo "select sysdate from dual ;" > now.sql
    bcm@bcm-laptop:~$ sqlplus user1/user1 @now
    SQL*Plus: Release 11.2.0.1.0 Production on Wed Dec 14 20:41:33 2011
    Copyright (c) 1982, 2009, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SYSDATE
    2011-12-14 20:41:33

  • OK now that there is no option to reveal "database" panel in DW CC, how do I create a database connection and build my phpmysql pages?

    Is there an alternative way other than manually entering PHP code?

    Thanks, It works. Author of the article politely says what many of us have to say to Adobe when they make "improvements" - WTF, Adobe???
          From: Ben Pleysier <[email protected]>
    To: Jon Lane <[email protected]>
    Sent: Saturday, January 31, 2015 1:44 AM
    Subject:  OK now that there is no option to reveal "database" panel in DW CC, how do I create a database connection and build my phpmysql pages?
    OK now that there is no option to reveal "database" panel in DW CC, how do I create a database connection and build my phpmysql pages?
    created by Ben Pleysier in Dreamweaver support forum - View the full discussionWeb development tutorial
    Deprecated Server Behaviors for Dreamweaver Creative Cloud
    WebAssist A better, more secure and future proof way MySQLi Server Behaviors
    Dreamweaver extension
    WebAssist If the reply above answers your question, please take a moment to mark this answer as correct by visiting: https://forums.adobe.com/message/7148099#7148099 and clicking ‘Correct’ below the answer Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: Please note that the Adobe Forums do not accept email attachments. If you want to embed an image in your message please visit the thread in the forum and click the camera icon: https://forums.adobe.com/message/7148099#7148099 To unsubscribe from this thread, please visit the message page at , click "Following" at the top right, & "Stop Following"  Start a new discussion in Dreamweaver support forum by email or at Adobe Community For more information about maintaining your forum email notifications please go to https://forums.adobe.com/thread/1516624.

  • Basic database question, and subscribe/unsubscribe code

    Hi there
    Although I've created and manage a website, and about a million years ago I worked with databases, I'm still a bit green and in need of some help ...
    I have the website based on my local machine (laptop).  I want to use a subscribe/unsubscribe for a newsletter via the website.
    Before I go ahead with this, I need to clarify a very basic database issue ... would I have to always leave my laptop running in order for people to be able to subscribe to the newsletter on the website, i.e. will it still connect to the database if the laptop is not running?
    I'm using Dreamweaver 3, so I hope I can use this version to connect with a database?  I did install Dreamweaver 4 on one occasion with the intent of upgrading the website to it, but because I'm still a bit unsure of myself and was unfamiliar with the changes the newer version created, I decided to leave it on Dreamweaver 3 rather than risk stuffing the website up completely!
    I also have Dreamweaver UltraDev but for some reason it won't install.
    I'm hoping to follow instructions given on Dreamweaver Developer Centre for setting up a PHP development environment (http://www.adobe.com/devnet/dreamweaver/articles/setting_up_php.html).
    If anyone would be so kind as to advise whether I'm on the right track with all this, using Dreamweaver 3, that'd be great!
    Also, I'm sure this is unlikely, but is there any way to include a subscribe-unsubscribe without having to actually use a database?
    Many thanks in advance    :-)
    Cheers, Chrissie

    Thanks for your help and advice - much appreciated.  I'm going to go the way
    of hosting, as you suggest, and save myself the heartache  
    Quoting jj12689 <[email protected]>:
    To answer your first question, yes your laptop needs to be powered on
    for users to be able to access the database and subscribe/unsubscribe.
    There is another way of doing it, but it requires more work on your
    part. You could make an online program that would generate SQL
    statements and place them in a text document on the server. Every time a
    user subscribes/unsubscribes it would add them to the end of the text
    document. Then you could make an update button on a back-end admin page
    that you would have to push that would take that text file, open it and
    take the sql statements and submit it to the database on your computer.
    I would advise against this method, since it is time consuming, and not
    very fast for today's world. I would recomend using a server based
    database, if the host you currently have dose not have a database, I
    would recomend finding another host. I use surpasshosting.com for my
    hosting because they are cheap, reliable, and have all the requirements
    I need.
     
    Hope this helps...
    >

  • Bc4j.xcfg, database connections and deploying ADF apps to oc4j

    I'm trying to understand how to enable custom database connections on a JDeveloper ADF application deployed to a stand-alone instance of OC4J.
    All entity objects were created as ADF Business Components.
    I looks like the db connection information used by the application is stored in a file named "bc4j.xcfg".
    How would I change the database connection information between different environments, changing the server, port and password information from an OC4J instance?
    I'd like to use an OC4J defined data-sources.xml file, but am looking for the simplest approach for now.

    Tomato tomaato, call it what you will, we now have to spend time (money) figuring out how to change from using the recommended use of a "connection" from Oracle tutorials and in Oracle Press books.
    Plus, neither I nor our client can get JDeveloper ADF 10.1.3 to work on OAS 10.1.2.
    Oracle has been of little help, other than stating to follow documentation. We followed the documentation at least a dozen times and on three different install of OAS 10.1.2.
    Why doesn't JDeveloper have a check-box or button that reconfigures the application to run on 10.1.2 (J2EE 1.3), there is a check-box to change JDK versions (1.4)? This is suspect to me.
    We are going to be speaking with the client this week, and have to state the ADF application works, but NOT on OAS 10.1.2.
    Does ADF work on OAS 10.1.3, absolutely, but the client is in 10.1.2 and can not upgrade at this time.
    I've read in blogs where lots of developers have the same issues without resolution and Oracle should just come out and state that 10.1.3 does not work on 10.1.2.
    So my experience has been a mixed bag with ADF, both in terms of the software and customer support from Oracle.

  • Database connection and what is the best method

    Hi - I am new at this, so hopefully someone can point me in the right direction.
    looking at a project costing form where specific users need to complete a form with some prepopulated data expense data
    The data is in a local Access database at the moment, with plans on moving it to a web sql tables.
    Overview
    I would like to be able to open a main form, select various criteria
    (ie select Project Number)
    push button to load data the specific project data
    push button to extend reader functionality and save as with a new name based on project number
    After review, push button to send PDF to user by email (email address is in the loaded data).
    User is able to save data locally on his PC (save capability with the extended reader functions)
    When user finished, he can send pdf back to me for data upload to the database
    Question 1:
    I am looking at the ODBC connection strings and javascript to do this.
    Is this possible? If so, what is the best way to do this?
    Question 2:
    Once the "extend features" has been used, can javascripts be used to load different data or extended the Reader functions can only be done after the data is loaded?
    Any help or assistance as to where to look would be greatly appreciated.

    As long as your database provides an ODBC driver then it can be used to access the DB. Please see my answers below for the rest of your queries.
    Paul
    I would like to be able to open a main form, select various criteria (ie select Project Number) push button to load data the specific project data
    <answer> This is doable. There are samples published but note that it will involve some javascript coding to accomplish
    push button to extend reader functionality and save as with a new name based on project number
    <answer> This woudl have to be done through Acrobat and woudl involve some manual intervention. Do you intend on sending the form with the data connection information to them? I woudl recommend that a separate form be used for this. The data connection may cause problems for them when they open the form (remember that they will not have access to the DB).
    After review, push button to send PDF to user by email (email address is in the loaded data).
    <answer> not an issue
    User is able to save data locally on his PC (save capability with the extended reader functions)
    When user finished, he can send pdf back to me for data upload to the database
    <answer> The form that they have will not be able to do DB connections so I woudl send back just the data. Then you can import it into your version of the form (that does DB connections) and you can do the update from that.
    Question 1:
    I am looking at the ODBC connection strings and javascript to do this.
    Is this possible? If so, what is the best way to do this?
    <comment> I just did a presentation on this topic .....here is the playback recording. It also has samples that show how to do it.
    http://adobechats.adobe.acrobat.com/p69655795/
    Question 2:
    Once the "extend features" has been used, can javascripts be used to load different data or extended the Reader functions can only be done after the data is loaded?
    <commment> The RE functionality in Reader will only allow them to save the PDF locally. I do not know how big this project is but if this is only for a few users, then I woudl buy Acrobat for your people (this gives them the ability to do the DB connection as well as RE to allow for the Customer to save the form locally). If this is a large project I woudl go down the LiveCycle Server path and woudl pre-populate the forms on the server. Note that this would be at least a 100K solution whereas the Acrobat woudl be the price of Acrobat times the number of users that you have.
    Make sense?

  • Too many database connections and configurator logins ?

    Hi,
    We're having some performance and/or stability problem with Oracle Waveset 8.1.1. patch 2.
    I'm not sure what the problems is yet, but two facts got my attention:
    I noticed for too many database connections waiting to be closed on the OS, varying between 600 and 1200 :
    TCP: IPv4
    Local Address Remote Address Swind Send-Q Rwind Recv-Q State
    doesburg.ic.uva.nl.33555 hopewell.ic.uva.nl.1539 49640 0 49640 0 TIME_WAIT
    doesburg.ic.uva.nl.33556 hopewell.ic.uva.nl.1539 49640 0 49640 0 TIME_WAIT
    doesburg.ic.uva.nl.33557 hopewell.ic.uva.nl.1539 49640 0 49640 0 TIME_WAIT
    doesburg.ic.uva.nl.33558 hopewell.ic.uva.nl.1539 49640 0 49640 0 TIME_WAIT
    etc.
    (doesburg is our Solaris 10 server where the tomcat application server is installed, hopewell is our Oracle 10g database server )
    I also noticed numerous Configurator logins in the audit log, about 10 per second:
    Audit Event Details
    Timestamp 03/15/2011 04:37:05 PM MET
    Subject CONFIGURATOR
    Action Login
    Result Success
    Identity System Type User
    Object Name CONFIGURATOR
    Server DOESBURG.IC.UVA.NL
    Sequence Number No Value
    Interface BPE
    Resource No Value
    AccountId No Value
    Message No Value
    Changes No Value
    Organization Membership Top
    Event Parameters
    Session ID #SESS#15E4CCFDD2645B36:10C191A6:12EB99FCC85:-5A50
    Configurator logins on the BPE interface which we don't use?
    Has anyone seen something like this before? What could cause it?
    Greetings,
    Marijke

    I'm still struggling with this problem. Our database administrator did add some tracing, and we see these type of queries:
    SELECT tstamp, id, version, changeType FROM objchange WHERE tstamp > :1 AND type=:2 ORDER BY tstamp
    SELECT tstamp, id, version, changeType FROM objchange WHERE tstamp > :1 AND type=:2 ORDER BY tstamp
    SELECT task.id, task.type, name, :"SYS_B_0", :"SYS_B_1", summary, :"SYS_B_2", :"SYS_B_3", xmlSize, :"SYS_B_4"
    SELECT tstamp, id, version, changeType FROM objchange WHERE tstamp > :1 AND type=:2 ORDER BY tstamp
    SELECT object.id, object.type, name FROM object WHERE object.type=:"SYS_B_0"
    SELECT tstamp, id, version, changeType FROM orgchange WHERE tstamp > :1 AND type=:2 ORDER BY tstamp
    SELECT tstamp, id, version, changeType FROM objchange WHERE tstamp > :1 AND type=:2 ORDER BY tstamp
    SELECT tstamp, id, version, changeType FROM objchange WHERE tstamp > :1 AND type=:2 ORDER BY tstamp
    SELECT tstamp, id, version, changeType FROM objchange WHERE tstamp > :1 AND type=:2 ORDER BY tstamp
    SELECT tstamp, id, version, changeType FROM objchange WHERE tstamp > :1 AND type=:2 ORDER BY tstamp
    SELECT tstamp, id, version, changeType FROM objchange WHERE tstamp > :1 AND type=:2 ORDER BY tstamp
    SELECT tstamp, id, version, changeType FROM rolechange WHERE tstamp > :1 AND type=:2 ORDER BY tstamp
    SELECT tstamp, id, version, changeType FROM objchange WHERE tstamp > :1 AND type=:2 ORDER BY tstamp
    541 seperate logon sessions by waveset in about 2 minutes.
    Has anyone seen this? What could cause it?
    Greetings,
    Marijke

  • How to create database connection and how to call it using Java

    Hi,
    Good day! I'd like to know how I can create a db connection in JDev, then use this connection to retrieve data using a Java Class? I've seen using New Gallery > Database Connection. But I'm not sure how I can access this connection using Java and display some output from the retrieved records.
    Any steps/tutorial link is appreciated.
    Thanks in advance,
    Rian

    Hi,
    If you need to access the connection in the entity object then refer http://download.oracle.com/docs/cd/E15523_01/web.1111/b31974/bcadvgen.htm#BABEIFAI i.e in MODEL.
    But if you want to access connection in ViewController part of application then you need to do it manually.For this i am giving you my code for reference.------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    import java.sql.Connection;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Statement;
    import javax.faces.context.FacesContext;
    import oracle.jdbc.pool.OracleDataSource;
    public class DataHandler {
    String jdbcUrl = null;
    String userid = null;
    String password = null;
    Connection conn;
    public static final String CONNECTION_STRING =
    FacesContext.getCurrentInstance().getExternalContext().getInitParameter("connectionString");
    public static final String USER_NAME =
    FacesContext.getCurrentInstance().getExternalContext().getInitParameter("userName");
    public static final String PASSWORD =
    FacesContext.getCurrentInstance().getExternalContext().getInitParameter("password");
    public DataHandler(String jdbcUrl, String userid, String password,
    boolean shouldConnect) throws SQLException {
    this.jdbcUrl = jdbcUrl;
    this.userid = userid;
    this.password = password;
    if (shouldConnect) {
    connect();
    public void connect() throws SQLException {
    OracleDataSource ds;
    ds = new OracleDataSource();
    ds.setURL(jdbcUrl);
    conn = ds.getConnection(userid, password);
    public Connection getConnection() {
    return conn;
    public ResultSet executeQuery(String sql) throws SQLException {
    Statement s = conn.createStatement();
    return s.executeQuery(sql);
    public void closeConnection() throws SQLException {
    if (!conn.isClosed()) {
    conn.close();
    ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

  • Dataview of a Database Connection and Filtering.

    I have a data connection to a SQL stored procedure, but the adding a filter to the dataview of the database connection doesn't seem to work on the front end. Is there something else that needs to be configured?

    Hi,
    From your description, you might want to fetch data from database to a Data View Web Part and apply filter on it.
    Would you mind providing more details about how you implement this in your environment? It will make other easier to find out the root cause of the issue.
    What’s more, you can take a look at the link below about
    Filtering SQL Data View Web Parts in SharePoint:
    http://roxority.com/sharepoint-zen/filtering-sql-data-view-web-parts-in-sharepoint.html
    In SharePoint, a more recommended way to access the data in a database is using
    Business Connectivity Services(BCS):
    http://www.codeproject.com/Articles/683749/Implementing-Business-Data-Connectivity-in-SharePo
    http://blogs.msdn.com/b/sharepointdev/archive/2011/02/10/173-a-step-by-step-guide-in-designing-bcs-entities-by-using-a-sql-stored-procedure.aspx
    More information about Business Connectivity Services in SharePoint 2013:
    http://technet.microsoft.com/en-us/library/ee661740(v=office.15).aspx
    Best regards
    Patrick Liang
    TechNet Community Support

  • Database connection and recordsets

    I have set up a database connection (to an Access database)
    and set up .asp pages to display various results. This works OK in
    the testing server apart from web links. How do I make those
    database fields which contain web addresses function as links? Is
    it to do with bindings? As you can probably tell, I'm quite new to
    Dreamweaver.
    Thanks

    Use the link fields and on the dialogue box that opens,
    choose the radio
    button that says "From Data Sources" instead of "File
    System". That will
    open up the access to the database fields and you can choose
    them.
    The link that results looks like this format:
    page2.asp?MyID=<%=myid %>
    Nancy Gill
    Adobe Community Expert
    Author: Dreamweaver 8 e-book for the DMX Zone
    Co-Author: Dreamweaver MX: Instant Troubleshooter (August,
    2003)
    Technical Editor: Dreamweaver CS3: The Missing Manual,
    DMX 2004: The Complete Reference, DMX 2004: A Beginner's
    Guide
    Mastering Macromedia Contribute
    Technical Reviewer: Dynamic Dreamweaver MX/DMX: Advanced PHP
    Web Development
    "fulmar57" <[email protected]> wrote in
    message
    news:g50pqa$9p7$[email protected]..
    >I have set up a database connection (to an Access
    database) and set up .asp
    > pages to display various results. This works OK in the
    testing server
    > apart
    > from web links. How do I make those database fields
    which contain web
    > addresses function as links? Is it to do with bindings?
    As you can
    > probably
    > tell, I'm quite new to Dreamweaver.
    > Thanks
    >
    >

  • Lan Database and Wireless Database Connectivity and Settings

    Some one help me that what the difference in LAN connectivity and connectivity over a wireless network.
    Is any difference. If difference than please send me some material to understand this.
    Thanks

    From the Oracle perspective, there is no difference where the communication comes from, as long as access through a supported protocol is established. So, from this perspective, all rules that apply to regular connectivity applies to wireless.

  • My MBP just blacked off on the table with speakers connected and running

    Have bought a MBP in HKG exactly 1 year ago and is almost in a near new condition.It usually sits in a air con room and is not mishandled.Now when i was listening to songs on my external speakers and the power cable connected and showing green ,it just blacked out from everything to nothing.No charging light & cannot power up the system,It's like a dead machine.Couldn't figure out what happened.Kindly assist me to know the prob and as i am on a ship and will be going to singapore in few days ,what should i expect from the service center people? How much financial damage would be forced on me??
    cheers guys

    Try SMC and PRAM resets:
    http://support.apple.com/kb/ht3964
    http://support.apple.com/kb/ht1379
    If no success, bring the unit into a repair facility.  I do not believe that there are any APPLE stores as such in Singapore and you will be at the mercy of the resellers.
    Ciao.

  • Cannot connect and run query for Access database

    Hi,
    I have a html file and a servlet file which contains code to connect to a database. I also have a sales database with customer table along with other tables in Access. I have created a DSN in Windows named sales which connects to the sales database. Now, when I am running the html form, the servlet does not run the query "Select * from Customer". It seems it cannot make any connection to the database.
    Any help is appreciated. I am very new to JDBC technology. Thanks.
    HTML FORM CODE:
    <html>
    <head><title>Sales</title></head>
    <body>
    <form action="http://localhost:8100/servlet/SalesServlet" method=POST>
    <strong>Select:</strong>
    <textarea cols=50 rows=8 name=select></textarea><p>
    <input type=submit value="Query">
    <input type=reset>
    </form></body></html>
    SALESSERVLET CODE:
    //Copyright (c) 2000, Art Gittleman
    //This example is provided WITHOUT ANY WARRANTY either expressed or implied.
    /* Queries the Sales database. Needs to be modified
    * to use metadata to correctly output the result set.
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.sql.*;
    import sun.jdbc.odbc.JdbcOdbcDriver;
    public class SalesServlet extends HttpServlet {
    Connection con;
    Statement stmt;
    public void init(ServletConfig sc) throws ServletException {
    super.init(sc);
    try{
    new JdbcOdbcDriver();
    String url = "jdbc:odbc:Sales";
    String user = "";
    String password = "";
    con = DriverManager.getConnection(url, user, password);
    stmt = con.createStatement();
    }catch (Exception e) {
    e.printStackTrace();
    System.exit(1);
    public void doGet(HttpServletRequest req,
    HttpServletResponse resp)
    throws ServletException, IOException {
    resp.setContentType("text/html");
    PrintWriter out = resp.getWriter();
    try{
    String query = req.getParameter("select");
    ResultSet rs = stmt.executeQuery(query);
    ResultSetMetaData rsMetaData = rs.getMetaData();
    int cols = rsMetaData.getColumnCount();
    while(rs.next()) {
    String s = "";
    for(int i=1; i<=cols; i++)
    s += rs.getString(i) + ' ';
    s += "<br>";
    out.println(s);
    }catch(Exception e) {
    e.printStackTrace();
    out.close();
    public void doPost(HttpServletRequest req,
    HttpServletResponse resp)
    throws ServletException, IOException {
    doGet(req,resp);
    }

    String url = "jdbc:odbc:Sales";
    String user = "";
    String password = "";
    con = DriverManager.getConnection(url, user, password);This might be causing your problem, but not sure. Since you don't need a username or password for the ODBC connection, you can just use
    con = DriverManager.getConnection(url);
    The username and password aren't needed, so you can just use the above call instead. Perhaps the ODBC is trying to find a user called "" with a password "" and puking on itself, who knows... but you should post whatever exceptions or specific problems you're having that make you think you're not connecting.

  • Database connection and display in JSP page

    hi,
    I am new to SAP netweaver. I have created a project using JSPDynPage, Beans and java file. I have configure the datasouce in Visual Composer. I deploy the project on the portal itself. I have try all kinds of codes bt cannot retrieve. Is there anyone can give a same codes for mi to connect to the datasource in Visual Composer and able to retrieve data, insert data and update data in SQL Server 2000. Thanks
    Regards,
    shixuan

    Hai Shixuan,
    Refer this link. I will helps
    Access data from SqlServer through Visual Composer.....?
    http://help.sap.com/saphelp_nw2004s/helpdata/en/fe/68e343cc68414da4426258d3e896ae/content.htm
    Write this code wher you need in JSPDynPage
    And
    MSSQL DataBase Access -> Help me
    Thanks and Regards
    Venkatesh
    Message was edited by:
            Venkatesh Ranganathan
    Message was edited by:
            Venkatesh Ranganathan

  • Need help with database connection and trasaction!

    Hi, I'm trying to load data from a huge report to DB2. My old way of doing this is: 1. using DriverManger.getConnection to get a connection.
    2. Then set autoCommit to false.
    3. Keep the connection open.....
    4. con.commit once I reach a section, let's say around 5000 records per section.
    5. Close the connection once I finish loading, (Finally block)
    I'm still new in the java world and kind of concern of the way of what I'm doing. Then I did some research. Perhaps using javax.sql.DataSource is a better approach. But I couldn't use it in WSAD. Do I need do some configuration? I heard it's in j2ee 1.4 . Is that the reason I couldn't use it?
    And.......I tried to use DAO pattern to talk with DB. By that way, I have to open and close connection everytime I invoke the dao method. Then how can I control the transaction? Because I don't want to insert each record data in to the table right away. I want to do the commit once I get all records for one section. No idea how can I achieve this.
    Any suggestion will be really appreciated!!!

    I'm still new in the java world and kind of concern
    of the way of what I'm doing. Then I did some
    research. Perhaps using javax.sql.DataSource is a
    better approach. But I couldn't use it in WSAD. Do I
    need do some configuration? I heard it's in j2ee 1.4
    . Is that the reason I couldn't use it?What you need to do is configure a Connection datasource. WSAD has that. You just need to go through the documentation and find out. I never worked on it.
    And.......I tried to use DAO pattern to talk with DB.
    By that way, I have to open and close connection
    everytime I invoke the dao method. Then how can I
    control the transaction? Because I don't want to
    insert each record data in to the table right away. I
    want to do the commit once I get all records for one
    section. No idea how can I achieve this.Since you want to simply insert multiple records, you might want to insert them in a batch. This is available in PreparedStatements.
    $ Carol.

Maybe you are looking for