3 Replies Latest reply on Apr 4, 2012 7:09 AM by TSGal

    Can't update required field through jdbc

    aditsu

      Summary

      Can't update required field through jdbc

      Product

      FileMaker Server

      Version

      11

      Description of the issue

      With FMS 11 I can't even prepare a statement that updates a required text field. I have the same problem with the 11.2.70 and 11.3.76 drivers.
      It was never a problem with FMS 8.

      Steps to reproduce the problem

      Create a table "test" with 2 text fields "field1" and "field2". Make "field2" required (not empty).
      Then run this program (with the appropriate adjustments for the connection information):


      import java.sql.Connection;
      import java.sql.SQLException;

      import com.filemaker.jdbc3.J3SimpleDataSource;

      public class FMTest {
           public static void main(final String... args) throws SQLException {
                final J3SimpleDataSource ds = new J3SimpleDataSource();
                ds.setServerName("fms11");
                ds.setDatabaseName("test");
                ds.setUser("admin");
                final Connection conn = ds.getConnection();
                conn.prepareStatement("UPDATE test SET field1=?");
                System.out.println("ok");
                conn.prepareStatement("UPDATE test SET field2=?");
                System.out.println("ok");
           }
      }

      Expected result

      ok
      ok

      Actual result

      ok
      Exception in thread "main" com.filemaker.jdbc.FMSQLException: [FileMaker][FileMaker JDBC] FQL0013/(1:16): Incompatible types in assignment.
           at com.filemaker.jdbc.FM_API.prepare(Unknown Source)
           at com.filemaker.jdbc.FM_API.prepare(Unknown Source)
           at com.filemaker.jdbc1.CommonJ1Statement.(Unknown Source)
           at com.filemaker.jdbc2.CommonJ2Statement.(Unknown Source)
           at com.filemaker.jdbc3.CommonJ3Statement.(Unknown Source)
           at com.filemaker.jdbc3.J3PreparedStatement.(Unknown Source)
           at com.filemaker.jdbc3.J3Connection.prepareStatement(Unknown Source)
           at com.filemaker.jdbc2.CommonJ2Connection.prepareStatement(Unknown Source)
           at FMTest.main(FMTest.java:15)

      Exact text of any error message(s) that appear

      see "actual result"

      Configuration information

      The server is running on a mac. I don't know what else could be relevant.

      Workaround

      Use a real database server, NOT filemaker.

        • 1. Re: Can't update required field through jdbc
          TSGal

          aditsu:

          Thank you for your post.

          Our Development and Software Quality Assurance (Testing) departments are aware of this issue with required field.  In addition to UPDATE resulting in "Incompatible types in assignment", an INSERT results in "Field failed required value validation test".

          No other information is available at this time.

          TSGal
          FileMaker, Inc.

          • 2. Re: Can't update required field through jdbc
            TimDybvig

            Hi TSGal,

            I'm experiencing the same issue,and was wondering if there has been a resolution to this issue yet.  I'm running FM Server Advanced 11.0.3.309 on Windows Server 2008 R2 SP1, and on the client side am using v11.2.70 of the ODBC driver.

            Will upgrading to the latest version of FM Server Advanced 11 fix this?


            Tim 

            • 3. Re: Can't update required field through jdbc
              TSGal

              Tim Dybvig:

              Thank you for your post.

              Until an hour ago, FileMaker Server Advanced 11.0.3.309 was the lates version.  However, FileMaker Server 12 was just released, and this problem appears to be fixed.

              TSGal
              FileMaker, Inc.