7 Replies Latest reply on Feb 11, 2016 6:48 AM by Mike_Mitchell

    Will Filemaker ever include an SQL debugger?

    ChrisC_3

      Like it says on the tin, will FM ever include a debugger for this functionality. Using built in SQL is currently a pain. Unfortunately, it's also the only way (that I know of) to pull data in the background while running a script (window freezing is out because of webdirect incompatibility).

        • 1. Re: Will Filemaker ever include an SQL debugger?
          CamelCase_data

          There is sort of a hidden way to get at least some information on issues with ExecuteSQL - this requires wrapping the ExecuteSQL call in simple a custom function.

           

          http://www.fmfunctions.com/fid/335 contains one such custom function, along with examples and explanations.

          • 2. Re: Will Filemaker ever include an SQL debugger?

            I agree.

             

            However, why wait?  Using the excellent JDBC Driver FileMaker distributes with it's installation files, you could use JDBC to connect directly to your FM database from a Java IDE's data tab and get SQL debugging already.

             

            Using a separate IDE is simple. You don't need to learn Java; you're just using the data tab.

             

            • You get a full screen with resizable windows,
            • The ability to write regular SQL by itself,
            • Save queries
            • View / Edit Tables
            • Pop-up support for fields and such, when writing SQL
            • Real-time error messages.
            • Resizable Windows/fonts -- see as much of the SQL output (or other windows as you want)
            • Ability to export directly from output
            • Ability to do UPDATE, INSERT, and DELETE commands (can't do these SQL commands from within FMP at all)

             

            And, using the JDBC driver, you could additionally write code externally to interact with the FM database if you wanted to.

             

            See my other posted link here for screenshots: Re: Consider using a remote Java console to create SQL Queries

             

            ---

             

            If I'm working on anything but the simplest SQL, I always start in the IDE. It's SO much faster and with much less pain. No unhelpful "?" outputs in the teeny tiny Data Viewer. Once I get the SQL working, then I move it into FileMaker unless I'm writing an external program to read/write the FM data.

             

            But whether you use the IDE or try write SQL in FileMaker, you still can only use the SQL subset FileMaker offers. That subset is pretty good for most cases.

             

            I think the popularity of SQL by FileMaker users may have caught FM by surprise., so hopefully in FileMaker 15, 16,  ...., they'll add better support for SQL (like UPDATE, INSERT, and DELETE) and have a way to really use SQL with a better or enhanced "data viewer" that isn't so frustrating (IMHO).

             

            Let me know if you have any questions, OK?

             

            - m

            • 3. Re: Will Filemaker ever include an SQL debugger?
              beverly

              SQL debugger for ExecuteSQL() function? or the xDBC functionality? or the Import and Execute SQL script steps? or ???

               

              beverly

              • 4. Re: Will Filemaker ever include an SQL debugger?
                Mike_Mitchell

                ChrisC_3 wrote:

                 

                [I]t's also the only way (that I know of) to pull data in the background while running a script (window freezing is out because of webdirect incompatibility).

                 

                 

                I'm not sure what you mean by this. There are other ways to get data without switching context (which is typically why you would worry about window flicker / freezing). Selector-Connector, temporary relationships, and PSoS come to mind immediately. Can you elaborate some more regarding what you're trying to do?

                • 5. Re: Will Filemaker ever include an SQL debugger?
                  beverly

                  This custom function (CF) is only works in Data Viewer (FMPAdvanced required - also needed to install the CF).

                   

                  Another "debugger" is to use EvaluationError() around your query. You at least get an error code that may give you a clue instead of the "?". And it works everywhere (Data Viewer and Custom Functions not required).

                   

                  EvaluationError

                   

                  Otherwise the CF is great!

                   

                  Also, if this blog has not been previously mentioned:

                  https://www.teamdf.com/blogs/unlocking-hidden-error-messages-in-the-executesql-function/

                   

                  beverly

                  • 6. Re: Will Filemaker ever include an SQL debugger?
                    ChrisC_3

                    Thanks to everyone for the feedback. In this particular case I was more interested in the possible implementation of a native debugger rather than finding a workaround (though the solutions are much appreciated).

                    On a side note, I was actually wrong about Window Freezing being incompatible with WebDirect, but forgot I mentioned it in this particular post and didn't edit it out.

                    • 7. Re: Will Filemaker ever include an SQL debugger?
                      Mike_Mitchell

                      To make a product suggestion, you can go here:

                       

                      Product Ideas

                       

                      Or, you can submit a feature request here:

                       

                      Company | FileMaker

                       

                      The former allows people to chime in on the idea. (If you look, there may already be a suggestion similar to yours.) The latter goes directly to the product team.