4 Replies Latest reply on May 15, 2013 8:48 AM by lonewolf

    Using FileMaker ODBC from Delphi XE2


      Goodmorning to everybody.


      I've an installation composed by FileMaker Advanced 12 on a Windows 2008 R2 server and a PC with FileMaker Pro, also 12.

      I try to access FileMaker Database froma Delphi XE2 application via ODBC.


      I've configured an ADO connection and an ADO table in order to access FileMaker data, but the text fields defined in Filemaker are mapped as TMemo in Delphi. Instead other fields types, like Number, Date and Time are mapped correctly.

      Is this right? There is a way to map this fields as string?


      Thank for any anwer.


      lone wolf

        • 1. Re: Using FileMaker ODBC from Delphi XE2

          I am not sure about the ADO connection method and that might be my lack of understanding.  But to make sure, I assume you are using the latest FileMaker ODBC driver on your Delphi XE2 machine and that you have set up a system DSN that points to the FileMaker server.  Is that correct? 


          Once the connection is made, FileMaker is going to provide the field as a type the SQL server can see.  One guess I may have is that your field is a very long field, longer than say a normal VARCHAR can support.  FileMaker does not have these length limitations, but it must define itself based on what is in the field.  I am imagining that if one of the records is longer than the max VARCHAR, then it will define itself as a Memo field as you described.  Are other shorter text fields in this table being defined as a VARCHAR or as MEMO?  If so, then you might want to set a maximum field length for your field to keep it from being defined as MEMO.  I would play with those things first because I don't think you can force FileMaker to change the way it shows field types in an ODBC connection. 

          • 2. Re: Using FileMaker ODBC from Delphi XE2

            Yes, it's correct.

            I've installed the latest ODBC version on my PC and also the last update of FileMaker on the server.


            I've thought about the fields lenght so I've created a sample database with 3 text fields:


                 Text_1     with the maximum number of characters set to 10

                 Text_2     with the maximum number of characters set to 255

                 Text_3     With the maximum number of characters not setted


            All the 3 fields are mapped in Delphi as TMemoFields regardless of the lenth.

            • 3. Re: Using FileMaker ODBC from Delphi XE2

              If you use this same ODBC connection, how do other SQL sources see it?  Do they also see it as memo fields?  Try something like Excel or Access, or another SQL database.

              • 4. Re: Using FileMaker ODBC from Delphi XE2

                I've just created an Access 2003 file and imported my FileMaker Structure with ODBC and it works.

                In Access 2003 the Text_1 and Text_2 fields are mapped as text and with the right dimension (10 and 255 char). the text_3 field, with no predefined dimension in mapped ad Memo but I think this is right.