Transferring contents in MsAccess database to Derby database

I have an Ms Access Database "school".
Is there a way by which I can transfer the Ms Access database "school" to derby database.
Thankyou in advance.

If you read more about the JDBC classes such as DatabaseMetadata, ResultSetMetadata
You might be able to write your own program to do the migration.
Also if you do some search on the web you might be able to find some code that someone else has already written.

Similar Messages

  • Inserting into MsAccess Database

    Hi,
    I am having problem with inserting a row into the MsAccess Database. I am getting error like
    "SQLException: Occurred while performing Database Operations ---> method Main() java.sql.SQLException
    : [Microsoft][ODBC Microsoft Access 97 Driver] Syntax error in INSERT INTO statement.[Microsoft][ODB
    C Microsoft Access 97 Driver] Syntax error in INSERT INTO statement".
    My code is as under:
    please help me out.
    Smitha
    ==========================================
    package dao;
    import utils.GeneralFailureException;
    import dbConnection.dbConnection;
    import java.util.*;
    import java.sql.*;
    public class GeneralExpenses {
    dbConnection dbCon = new dbConnection();
    public GeneralExpenses() {
         super();
    public static java.sql.Timestamp getTstamp() {
    java.util.Date date = (Calendar.getInstance()).getTime();
    java.sql.Timestamp tStamp = new java.sql.Timestamp(date.getTime());
    System.out.println("The Time Stamp : " + tStamp);
    return tStamp;
    public void insertExpenseTable(String sExphead, double dAmount, String sMode)
         throws GeneralFailureException, SQLException, ClassNotFoundException {
         String inssql = "INSERT INTO EXPENSES(tnum, date , " + sExphead + ", " + sMode + ") VALUES(?,?,?,?)";
         Connection conn = null;
         PreparedStatement pstmt = null;
         try {
              conn = dbCon.getConnection();
              pstmt = conn.prepareStatement(inssql);
              pstmt.setInt(1, 100);
              pstmt.setTimestamp(2, getTstamp());
              pstmt.setDouble(3, dAmount);
              pstmt.setString(4, sMode);
              pstmt.executeUpdate();
         } finally {
              dbCon.closeAll(pstmt, conn);
    public static void main(String[] args) {
         try {
    GeneralExpenses ge = new GeneralExpenses();
         ge.insertExpenseTable("xxxxxxx", 250.35, "yyyyyyyy");
         System.out.println("worked");
         } catch(ClassNotFoundException sqlex) {
         System.err.print("SQLException: Occurred while performing Database Operations ---> method Main() " + sqlex);
         System.err.println(sqlex.getMessage());
         catch(SQLException sqlex) {
         System.err.print("SQLException: Occurred while performing Database Operations ---> method Main() " + sqlex);
         System.err.println(sqlex.getMessage());
    } catch(GeneralFailureException e) {
         System.err.print("GeneralFailureException: Occurred while Establishing Connection ---> method getConnection() " + e);
         System.err.println(e.getMessage());
    } catch(Exception e) {
         System.err.print("GeneralFailureException: Occurred while Establishing Connection ---> method getConnection() " + e);
         System.err.println(e.getMessage());

    I'm so happy to finally found the answer of my problem with that message Kurt.
    Thank you very much... !
    I will now remember that date cannot be the name of a field when using jdbc-odbc. I called my field TransDate and it is now working perfectly!

  • High enq: TX - row lock contention on RAC database

    Hi Gurus,
    I have SAP applications running on 5 Oracle 10g (10.2.0.5) RAC nodes.
    I could observe high row lock contention in the database.
    db file sequential read          13.555.789.712     7.148.542.630     5.27     65
    enq: TX - row lock contention     45.685.386     1.622.457.531     355.14     15
    CPU                         0     1.123.793.901          10
    gc buffer busy               969.769.720     365.874.242     3.77      3
    gc cr grant 2-way          7.565.517.708     161.443.528     .21     1
    log file sync               244.392.565     155.406.980     6.36     1
    gc current block busy          86.643.267     139.935.394     16.15     1
    db file parallel read          80.779.109     124.238.490     15.38     1
    gc current block 3-way          2.412.777.861     98.748.193     .41     1
    read by other session          227.935.152     95.543.751     4.19     1
    I am able to observe one or two update/insert statements in this state.
    I would need your help in go ahead for analyzing and finding out the problematic SQL statements.
    Though there is no performance issue at the moment, I would like to initiate this proactively.
    Database parameters are set consistently with the latest patches for 10.2.0.5.
    Br,
    Venky

    If you are licensed for diagnostic pack, look at the ASH data in v$active_session_history and dba_hist_active_sess_history.
    Using the p1/p2/p3 columns and the blocking information, you should be able to see what sessions were waiting on and what sql was being run for the sessions waiting.

  • What is the driver name to be given for connecting with an MSAccess database?

    I tried the 32bitODBC test on the MSAccess database. Works fine. My loaded java program trying to connect with the database is still not working. NullPointerException runtime error.
    Maybe the driver that I've loaded is wrong viz. sun.jdbc.odbc.JdbcOdbcDriver.
    What is the correct drivername to be given in class.forname("driverName")?
    Any clues?

    what u've given as the driver name is correct. The NullPointerException comes because of problems with passing parameters from the front end to the database. It's receiving null parameter values. Check the parameters u r passing to the database. I think this will solve the problem.

  • How can I compact a MSAccess database with java?

    Hi.
    I have a question (Please Help!!!):
    How can I compact a MSAccess database with java-jdbc? Is it posible?
    Thanks

    MS Access database has a max length limitation of 2.14GB for Access 2000( 1.07G for Access 97), and won't recycle basically space for update/delete sql so tha it's a good idea to use MS Access database for program, which need update/delete frequent ly data. The programmers of HXTT Access(www.hxtt.net) are writing code for CREATE TABLE/DATABASE sql now. If you need a pure Java solution for PACK TABLE/DATABSE urgently in your project, you should send such a requirement to the Support page of www.hxtt.net so that they can schedule complementing such a fucntion. Otherwise, you should pack your databae manually or visit C++ code for Compact an Access Database Programmatically at
    http://www.codeguru.com/Cpp/data/mfc_database/microsoftaccess/article.php/c4327/ , or use Easy Microsoft Access MDB MDE Compactor at http://www.easyhr.com.au/software/easy_mdb_mde_compactor.htm.

  • Using JDBC to send data to MsAccess database

    Hi,
    I have received a MSAccess database on a file. I have placed the database on a networkdrive, and need to write data to the tables in this database. The networkdrive is mapped like //Data/DB/Databse.mdb
    How do I connect the jdbc adapter to this database? Can it be done, like you normally connect to a database system with servername and port?
    Kind regards
    Mikkel Íversen

    Hi
    In that case u have to provide the Connection parameter and the driver name.
    Refer today thread : https://www.sdn.sap.com/irj/sdn/profile?userid=3596219
    Enter the following parameter in the JDBC adapter..
    JDBC Driver = "sun.jdbc.odbc.JdbcOdbcDriver"
    Connection = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=
    DataDBDatabse.mdb"
    if there is authentication then enter :
    uername & Password.
    Also note your .mdb file should be on the same server where the XI is installed.
    Thanks
    Farooq.
    *Rewards points if you find it useful*

  • What content of Oracle Database 10g Companion CD Release 2 (10.2.0.1.0)

    Hi
    I want to download the 10G Standard Edition , Now i want to know what is content of
    Oracle Database 10g Companion CD Release 2 (10.2.0.1.0) ?
    is it required for OCA exam preparation ?

    The documentation site (http://www.oracle.com/pls/db102/portal.portal_db?selected=1 for 10gR2) provides 3 sets of installation documents:
    - server
    - companion
    - client
    Each document describes what is on the CD. Right at the front. In summary:
    Oracle HTTP Server
    Oracle HTML DB
    Oracle JDBC Development Drivers
    Oracle SQLJ
    Oracle Database Examples
    Oracle Text Supplied Knowledge Bases
    Oracle Workflow Server
    Oracle Ultra Search
    JPublisher
    Oracle Workflow middle-tier components
    It also contains the Java-based Oracle Enterprise Manager.
    You do not need it to study for the OCA. However, having samples that work and ready made data is very handy.
    Step 1, or possibly even step '0' of the OCA training should always be 'how to use the documentation'. At least, that's the way I teach the OCA/OCP courses.

  • How to display the contents of the database values which are retrived.

    how to display the contents of the database values which are retrived in servlets and i am able to display the contents in the servlets and if forward to jsp using requestdespatcher,the values are to be shown in jsp one below the other.please suggest me in these........the servlet code is as shown
    while(rs.next()){
                        buffer.append(rs.getString(1));
                        buffer.append(rs.getString(2));
                        buffer.append(rs.getString(3));
                        buffer.append(rs.getString(4));
                        buffer.append(rs.getString(5));
                        buffer.append(rs.getString(6));
                        buffer.append(rs.getString(7));
                        buffer.append(rs.getString(8));
                        buffer.append(rs.getString(9));
                        buffer.append(rs.getString(10));
                        request.setAttribute("result1",buffer);
                        RequestDispatcher rq=request.getRequestDispatcher("/results.jsp");
                        rq.forward(request,response);
    in jsp iam using the getAttribute to retrieve the values as shown
    <% StringBuffer sb=(StringBuffer)request.getAttribute("result1"); %>
    <%= sb %>
    but getting the results in the stretch,i need to display the result one below the other.

    if you load it all into the buffer that is going to be very difficult. I would suggest loading it into some sort of collection. I like using an ArrayList.
    Then pass the arraylist.
    you will then on the jsp iterate through the arrayList using what every you want.. el, logic tags, scriplets.
    so something like
    ArrayList arrayList = new ArrayList();
    while(rs.next()){
    arrayList.append(rs.getString(1));
    //or possibly an arrayList of String arrays
    //maybe using nested for loops.  Inner for loop adds result to string[] then //outer adds string[] to arrayList.
    //can be done any number of ways based on your expected result set.

  • Transferring content from old apple ID to a new one?

    As question says I need help transferring content from old apple ID to a new one as my old apple ID was reported for spam and now I can't use it, thanks!
    [email protected]

    Anything Downloaded with a Particular Apple ID is tied to that Apple ID and Cannot be Merged or Transferred to a Different Apple ID
    FAQs   http://support.apple.com/kb/HE37
    However... To Contact iTunes Customer Service and request assistance
    Use this Link  >  Apple  Support  iTunes Store  Contact

  • Storing dymanic content in the database

    I am trying to allow the user to create their own "reports" and I need them to be able to store content with variables names into the database.
    for example
    A user would type the following information into a multi-line text box and store that in a SQL database field.
    Hello, #firstName#, Thank you for contacting us on #contactdate#.  If there is anything I can help you with, please contact me at #companyPhone#.
    There would then be a page that would look like this:
    <cfquery name="getContent" datasource="x">
    select usercontent
    from contenttable
    where id = 1
    </cfquery>
    <cfquery name="getList" datasource="x">
    select firstname, contactdate, email
    from userlist
    </cfquery>
    <cfmail to="#email" from="[email protected]" subject="Follow up" query="getList">
    #getContent.usercontent#
    </cfmail>
    So basically, I want the  email to be compiled from the text that the user enters into the DB, and the variables populated with the correct info.
    I've tried playing with the evaluate() and de() fields but I cant get on the right track.
    If I use #evaluate(getcontent.usercontent)# I can get it to work, only using 1 variable.  I cant get it to work with the whole paragraph of text.
    any help would be greatly appreciated.
    steve

    after more digging I found a solution that worked:
    <cffunction access="private" name="ConvertLinks" returntype="string">
              <cfargument name="theContent" type="string" required="yes">
        <cfset var theReturn=arguments.theContent>
         <!--- setup each field that may be used --->
        <Cfsavecontent variable="firstname">#firstname#</Cfsavecontent>
        <Cfsavecontent variable="contactdate">#contactdate#</Cfsavecontent>   
        <Cfsavecontent variable="email">#clinicianid#</Cfsavecontent>       
         <!--- replace each field that may be used, case sensative --->
        <Cfset theReturn=replace(theReturn,firstname,Evaluate(de(firstname)),"All")>
        <Cfset theReturn=replace(theReturn,contactdate,Evaluate(de(contactdate)),"All")>   
        <Cfset theReturn=replace(theReturn,email,Evaluate(de(email)),"All")>       
         <!--- return the usable value --->
              <cfreturn theReturn>
    </cffunction>
    and I call
    <cfoutput>#convertlinks(getContent.usercontent)# </cfoutput>
    on my page.

  • How to access query name in MSAccess Database?

    <p>
    I am using MsAccess as Database.The driver is not supporting some of the features, then how can I retrieve information such as getting the query name, if any way pls do help.
    Thanx.
    </p>

    Not sure I understand the question, but MS Access has some system tables which contain some informaiton on queries.

  • How to migrate SharePoint 2013 Content and Configuration DataBases to a new SQL Server and DataBases in it?

    Hi,
    We need to migrate Our current 1 clustered SQL Server, Many Configurations DataBases and Many Content DataBases to a brand new clustered SQL server and brand new databases in it.
    How can I do this?
    Can someone list the steps involved?
    Thanks.  

    Hi,
    According to your description, you want to move Content databases  and Configuration databases to a new SQL Server,  refer to this article:
    https://technet.microsoft.com/en-us/library/cc512725.aspx?f=255&MSPPError=-2147217396
    Besides, here is a similar post, you can use as a reference:
    https://social.technet.microsoft.com/Forums/office/en-US/2cd46f7a-d583-41b2-82c2-ddc6d7c43fb8/how-to-move-sharepoint-databases-to-new-sql-server?forum=sharepointadminprevious
    Best Regards,
    Lisa Chen
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Delete all content in a database table

    i want to initialize a database table just before my specific program terminate.
    can i use the
    delete databasetable
    Edited by: Matt on Nov 7, 2008 8:04 AM

    Hi,
    If you want to delete all the contents of database table, use the following code:
    data itab type standard table of dbtab.
    select * from dbtab into table itab.
    delete dbtab from table itab.
    Hope this will help.
    Regards,
    Nitin.

  • Submit webform content to external database through webservices

    Hi 2 all,
    we need to achieve the following :
    - create a webform where user insert his main details (name, company, email etc.)
    - in the webform there is a script that generates two random number to be used as username and password
    - all data of the webform shall be sent to an external database through the webservices provideb by the external site
    - the external site validates the form and send a TRUE/FALSE reply to BC
    - based on TRUE / FALSE reply the user see a webpage with different content and receives an e-mail with username and password if the reply of the external site is TRUE (as per random generated numbers above)
    is it possible to achieve those functionalities with BC an if not, someone knows if anybody faced a similar project so to read a tutorial or so?
    thanks
    Franco

    what we need to achieve is to send to the external database some data (username and password) to create a user in that application, if the username and password meet the requirements, the webservice send a TRUE / FALSE reply that will tell BC to send to user's e-mail a different message (if TRUE, send the username and password generated by the webform as described in my first message, if FALSE tells the user to resubmit the form, but since the parameters for creating USERNAME and PASSWORD are not directly edited by the user, the FALSE case shall be almost equal to none).
    we need to communicate with external database because the BC webform shall send the data to generate a username/password in the external application
    hope these new infos can help.
    we are really try to understand if a BC webform can send data to an external application through their webservices
    and in addition if it is possible within a webform to generate a random username and password to be included in the webservice XML structure
    if you need more infos we can have a chat on Skype or other ...
    Thanks

  • Adding content from a database

    Hi there, I'm looking for a way to add content to a JComboBox from a database. I have the code to connect the database to my application working fine but am struggling to find the appropriate way to make my JComboBox display data from my database. I'll leave all the code I have at present...
    import java.sql.*;
    import java.io.IOException;
    import java.io.*;
    import java.util.Properties;
    public class ConnectDB {
         public static void init(String fileName)
         throws  IOException, ClassNotFoundException
              Properties props = new Properties();
              FileInputStream in = new FileInputStream(fileName);
              props.load(in);
              String driver = props.getProperty("jdbc.driver");
              url = props.getProperty("jdbc.url");
              username = props.getProperty("jdbc.username");
              password = props.getProperty("jdbc.password");
              Class.forName(driver);  
         public static Connection getConnection() throws SQLException
              return DriverManager.getConnection(url,username,password);
         private static String url;
         private static String username;
         private static String password;
    }     (I obviously have a text file in my folder with my connection details)
    Then I'm trying to build a GUI in netbeans that will retrieve and update my database so I have something like this...
        private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {                                        
            jComboBox1.addItem("Please Click Button");
            try{
            ConnectDB myDB = new ConnectDB();
            myDB.init("DBoracle.txt");
            Connection conn = null;
            conn = myDB.getConnection();
            String query = "select * from Employee";
            Statement stmt = null;
            stmt = conn.createStatement();
            ResultSet rs = stmt.executeQuery(query);
            rs.next();
            String s = rs.getString(2);
            //Return the second entry from my database and add it to my JComboBox
            // in theory i'll be adding a loop later to add all the entries to my JComboBox
            jComboBox.setItem(s);
            catch(Exception e){}
        }                                     

    Thanks cotton for at least trying to point out my errors, I am only too aware of my lack of experience in doing this sort of thing hence why I'm posting here I'm a student trying to learn about these things and at the moment am admittingly struggling with it. I have read and followed the JDBC tutorial, infact that's where I started with this but it is at best limited and could maybe do with some more sample code on expanding the idea. It does however point to the fact that it is kinda limited in how it returns data:
    The ResultSet.getXXX methods are the only way to retrieve data from a ResultSet object, which means that you have to make a method call for each column of a row. It is unlikely that this is the cause of a performance problem, however, because it is difficult to see how a column could be fetched without at least the cost of a function call in any scenario. We welcome input from developers on this issue.
    Perhaps some of the developers on here could help solve this issue...
    I know my code is a bit messy but it's the trial and error approach I use, cumbersome I know but it's all I know with my limited knowledge. Probably not the best for posting on here but this is my near complete code. The extra textfield will be used to return data from a trigger which tested ok too. So my problem is I want to make textfield1 a combobox that returns all my primary keys from my table and then I could click on one and all my textfields would reflect my choice. e I'm guessing I'd be using an actionListener approach? I don't need the actual code for it I'm quite happy to plough on and try and figure it out for myself cos it's how I'll learn just want a suggestion on how I would approach it..
    import java.sql.Connection;
    import java.sql.ResultSet;
    import java.sql.Statement;
    public class NewJFrame extends javax.swing.JFrame {
        /** Creates new form NewJFrame */
        public NewJFrame() {
            initComponents();
        /** This method is called from within the constructor to
         * initialize the form.
         * WARNING: Do NOT modify this code. The content of this method is
         * always regenerated by the Form Editor.
       //Removed this code cos post too big!
        private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {                                        
            try{
            ConnectDB myDB = new ConnectDB();
            myDB.init("DBoracle.txt");
            Connection conn = null;      
            conn = myDB.getConnection();
            String query = "select * from SYSTEM.monitoringLab";
         Statement stmt = null;
            stmt = conn.createStatement();
            ResultSet rs = stmt.executeQuery(query);
            //rs.next();
            // this was being used earlier to test that I was getting my results set
            String s = rs.getString(1);
            String t = rs.getString(2);
            String u = rs.getString(3);
            String v = rs.getString(4);
            String w = rs.getString(5);
            String x = rs.getString(6);
            jTextField1.setText(s);
            jTextField2.setText(t);
            jTextField3.setText(u);
            jTextField4.setText(v);
            jTextField5.setText(w);
            jTextField6.setText(x);
            conn.close();
            stmt.close();
            catch(Exception e){
            System.err.println("Got an exception! ");
            System.err.println(e.getMessage());
        private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
            jTextField1.setText(null);
            jTextField2.setText(null);
            jTextField3.setText(null);
            jTextField4.setText(null);
            jTextField5.setText(null);
            jTextField6.setText(null);
        private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {
            try{
            ConnectDB myDB = new ConnectDB();
            myDB.init("DBoracle.txt");
            Connection conn = null;
            conn = myDB.getConnection();
            Statement stmt = null;
            stmt = conn.createStatement();
            stmt.executeUpdate("INSERT INTO SYSTEM.monitoringLab values ("
                    + jTextField1.getText() + "," + jTextField2.getText() + ","
                    + jTextField3.getText() + "," + jTextField4.getText() + ","
                    + jTextField5.getText() + "," + jTextField6.getText() + ")");
            conn.close();
            stmt.close();
            catch(Exception e){
            System.err.println("Got an exception! ");
            System.err.println(e.getMessage());
        * @param args the command line arguments
        public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    new NewJFrame().setVisible(true);
        // Variables declaration - do not modify
        private javax.swing.JButton jButton1;
        private javax.swing.JButton jButton2;
        private javax.swing.JButton jButton3;
        private javax.swing.JLabel jLabel1;
        private javax.swing.JLabel jLabel2;
        private javax.swing.JLabel jLabel3;
        private javax.swing.JLabel jLabel4;
        private javax.swing.JLabel jLabel5;
        private javax.swing.JLabel jLabel6;
        private javax.swing.JLabel jLabel7;
        private javax.swing.JLabel jLabel8;
        private javax.swing.JTextField jTextField1;
        private javax.swing.JTextField jTextField2;
        private javax.swing.JTextField jTextField3;
        private javax.swing.JTextField jTextField4;
        private javax.swing.JTextField jTextField5;
        private javax.swing.JTextField jTextField6;
        private javax.swing.JTextField jTextField7;
        // End of variables declaration
    }Edited by: jojololo on Dec 11, 2009 4:44 AM

Maybe you are looking for

  • Wacom Tablet causes Apple wireless keyboard to stop working.

    My Wacom tablet/pen causes my Apple wireless keyboard to stop working.  While working on a photo in Photoshop using my Apple (usb) mouse to make selections the keyboard works fine.  When I use the Wacom Pen to make selections, not immediately but any

  • Error downloading videos purchased on iTunes store

    I recently upgraded to the 30GB iPod w/ video. I purchased a couple of videos from the iTunes store and when I attempt to download I get an error message: "There was an error downloading you purchased music. The disk could not be read from or written

  • How do I MERGE, not overwrite my contacts?

    I cleaned out all of the contacts in Outlook because there were many duplicates, but now when I sync, instead of it giving me the option to merge, it overwrites any contact in my phone with the blank address book from Outlook/iCloud.  Wasn't there a

  • IPhone 4 on iOS5 sync fail.

    What's happening is that it is going through steps 1 to 6, but then getting stuck on step 7 saying "waiting for items to copy" and it never finishes. Then I am forced to eject it. Any tips?

  • E-filing of quarterly TDS returns..

    Hi Experts, We have activated Extended Withholding Taxes in our ECC 6.0 version. But we have Not done any E Filing of quarterly and Annual Returns. Now we want to start doing the e filing. Could any body please send the detailed steps for this E Fili