LAE

Welcome to the LAE community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Discussions

Members

Resources

Events

 View Only
  • 1.  Export to DBF

    Employee
    Posted 03-13-2016 18:51

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: islandz

    Good evening,

    Does anyone know how I can export to a DBF file? I am not much of a programmer, so any assistance anyone can provide would be much appreciated.

    Thank you


  • 2.  RE: Export to DBF

    Employee
    Posted 03-13-2016 20:30

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: stonysmith

    DBF is not directly supported.

    One of the simplest ways to accomplish this might be to find a JDBC driver for DBF files and use the JDBC_Store node to output the data.
    There seem to be several popular ones available.


  • 3.  RE: Export to DBF

    Employee
    Posted 03-15-2016 08:43

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: islandz

    Thanks Stonysmith. Please forgive me, but a) I'm pretty new to Lavastorm; and b) I'm fairly Noob at java programming. I have found a couple of options to use a JDBC driver, but I am not sure how to specify the data source being the input peg, as opposed to the SQL statement. I am looking at using the code below:

    {
                Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                String connString="jdbc:odbc:Driver={Microsoft dBASE Driver (*.dbf)};DefaultDir=E:\\db";//DeafultDir indicates the location of the db
                Connection connection=DriverManager.getConnection(connString);
                String sql="SELECT * FROM table_name where condition";// usual sql query
                Statement stmt=connection.createStatement();
                ResultSet resultSet=stmt.executeQuery(sql);
                while(resultSet.next())
                {
                    System.out.println();
                }
                System.out.println();
            }
            catch (ClassNotFoundException e)
            {
                e.printStackTrace();
            }
            catch (SQLException e)
            {
                e.printStackTrace();
            }


  • 4.  RE: Export to DBF

    Employee
    Posted 03-18-2016 10:41

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: ryeh

    Changing gears for a second, Ahmad and I were able to use the R library 'foreign' to output DBF files. Check out the attached. For reference, see: http://www.inside-r.org/r-doc/foreign/write.dbf
    Attachments:
    DBF_Example.brg


  • 5.  RE: Export to DBF

    Employee
    Posted 03-27-2016 05:02

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: awilliams1024

    You may want to also review this thread discussing the acquisition of data from .dbf files:

    http://community.lavastorm.com/threa...-for-DBF-files