3 Replies Latest reply on Jan 22, 2004 9:17 AM by 807582

    jdbc  odbc *.dbf

      Any one know how to connect to a dbf ? Im doing something wrong! any literature on this topic?
        • 1. Re: jdbc  odbc *.dbf

          Have you
          1) Set up an ODBC data source in the Windows "Data Sources(ODBC)" control panel ?
          2) Connected via the following connection url, eg. if you named your odbc datasource "myDBF",
          the jdbc url should be "jdbc:odbc:myDBF"

          That's the main difference between reading dBase files, and a standard JDBC data source.


          • 2. Re: jdbc  odbc *.dbf
            tried that already. it might be my sql statements

            String query = "UPDATE mon_sta SET ZDATE_ENT = 19501111 WHERE ZDATE_ENT = 11111111";

            int result = statement.executeUpdate( query );

            nothing happens when i check for the updates so i thought my connection was wrong!
            • 3. Re: jdbc  odbc *.dbf

              If you're not getting any SQLExceptions from executeUpdate(), then it worked.
              Check result, it is the number of rows updated.

              Have you actually checked your data ?
              Execute "select * from mon_sta where ZDATE_ENT = 111111111"... see if there's any results.
              If not, then you're trying to update a record that doesn't exist / conform to your where clause.