Announcement

Collapse
No announcement yet.

[SOLVED] Quick Search - error accessing database - SQL error

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • [SOLVED] Quick Search - error accessing database - SQL error

    Hi

    No matter what I search in Quick Search - I get an error:

    BEFORE clicking magnifying glass...
    cap1.JPG

    AFTER clicking magnifying glass...
    cap2.JPG

    Looks like the generated SQL is malformed somehow (on 8.00.0040)? Only just started using quick search, so I'm unsure if the last update caused this or if it's been an issue for a while?

    Also in dynamic search if searching in a field that "contains" a string "bl" I get JS popup with a malformed HTML error message (I'm guessing it should show the error like the above picture, but I suspect the control codes used upset even that process):

    cap3.JPG
    Last edited by adz1111; 04-13-2015, 11:44 AM.

  • #2
    Originally posted by adz1111 View Post
    Hi

    No matter what I search in Quick Search - I get an error:

    BEFORE clicking magnifying glass...
    [ATTACH=CONFIG]2039[/ATTACH]

    AFTER clicking magnifying glass...
    [ATTACH=CONFIG]2040[/ATTACH]

    Looks like the generated SQL is malformed somehow (on 8.00.0040)? Only just started using quick search, so I'm unsure if the last update caused this or if it's been an issue for a while?
    Assuming it's a grid could you post your SQL code?

    Comment


    • #3
      Just added a bit more info above......

      It s a grid, however, I cannot post the SQL as it's auto-generated SC SQL behind those search options (I believe)

      Comment


      • #4
        Enable debug options under application
        /Giuseppe

        Professional Scriptcase Services
        Some Customers opinions

        Comment


        • #5
          Was talking about the SQL of the main grid, but as Giu says udner Application > Settings somewhere there is a debug option which makes it echo every SQL command executed (should do the searches too).
          But too be honest I was assuming SC was having a problem with generating a search around your grid's SQL, it has the tendency of doing that whenever your SQL gets a tad bit complicated.
          However I think the search doesn't work well with look-up fields either, so could be something there too.

          Comment


          • #6
            Thanks folks

            I'm aware of that, but the SQL is out of my control - it's an SC generated thing. However, I accept the echo'd SQL from the debug would help SC see exactly where it's messing up. I'll add it here a bit later today when I have access again.

            Thanks

            Comment


            • #7
              Ok - as I suspected - enabling debug does not help because that quick search SQL does not appear. This is because it looks like it's generated on the fly by SC, and it "fails" before it can be shown on a debug line) - so I simply get the error message still.

              Incidentally, this failure occurs only against a multiline text field.

              So - as I stated also in my first post - the codes in the javascript dialog (highlighted in that post) are where I suspect the problem lies...???

              Comment


              • #8
                Originally posted by adz1111 View Post
                Hi

                No matter what I search in Quick Search - I get an error:

                BEFORE clicking magnifying glass...
                [ATTACH=CONFIG]2039[/ATTACH]

                AFTER clicking magnifying glass...
                [ATTACH=CONFIG]2040[/ATTACH]

                Looks like the generated SQL is malformed somehow (on 8.00.0040)? Only just started using quick search, so I'm unsure if the last update caused this or if it's been an issue for a while?

                Also in dynamic search if searching in a field that "contains" a string "bl" I get JS popup with a malformed HTML error message (I'm guessing it should show the error like the above picture, but I suspect the control codes used upset even that process):

                [ATTACH=CONFIG]2041[/ATTACH]

                Good morning!

                We conducted several tests and we could not simulate this problem.

                I need of more information, so we can find the error.

                I need that send me the SQL code used in the query or the application and script for creation of the tables that being used in the application.

                You can send to e-mail: support@scriptcase.net

                I am waiting for your return.

                Thanks.

                Álvaro Moura.
                Scriptcase team.

                Comment


                • #9
                  Thanks Alvaro - I have emailed what you asked for - let me know if you need anything further.

                  Thanks again

                  Comment


                  • #10
                    Good morning!

                    I went able to simulate the second error only.
                    It occur if use the quick search in a field created in Scriptcase, existing only in tool.
                    This error is with the development team.

                    The first error I went not able to simulate.
                    I don't can execute the sent application, because have some variables and not know the values.

                    Álvaro Moura.
                    Scriptcase team.

                    Comment


                    • #11
                      Thanks alvaro

                      I strongly suspect the reason for the error is the same in both cases - it's just one is via dynamic search, and the other is via quick search. The error looks the same in both cases (just formatted differently). So if the developers fix it for dynamic search, I would suggest they look for a similar problem in quick search too.

                      If, however, the basic logic behind quick and dynamic search is very different then I'm happy to send you whatever else you need to help you recreate the issue.

                      Thanks again

                      Comment


                      • #12
                        Hello,

                        This problem has been solved in release 8.0.045

                        Thank you!
                        Best Regards,
                        John L. Santos

                        Bug Tracker Team
                        NetMake - IT Solutions

                        Comment


                        • #13
                          Thanks John

                          Did a quick test - seems okay - however, one of the fields that should be searchable does not seem to be searched - same for dynamic search. The field is selected as a searchable field, but is not shown as a selectable condition in the drop down?

                          EDIT: Actually on looking, the field I had selected on the right is not appearing on the left - so if I shift it to the left it disappears and is not choosable again. Will try and reset it all to see if it re-appears.

                          FURTHER EDIT: It seems the fields listed to choose from for the searches do NOT include any user created non-database fields (think you guys call them virtual fields). It was one of those I was having the error on. The fix may have fixed searching in these virtual fields, but not much good if I cannot add a virtual field to the fields that I want to be searchable :-p
                          Last edited by adz1111; 05-15-2015, 09:56 AM.

                          Comment


                          • #14
                            Hello,

                            The jsbinca posted the answer in another thread. I hope have helped you!

                            Originally posted by jsbinca View Post
                            @adz1111
                            That's why it's called virtual. :-)
                            You cannot search in a database/record set for a field that is not there.
                            If you want it to be searchable you have to include it (subselect/join) in your sql statement for the grid or create a view with the fields you need.

                            jsb
                            Best Regards,
                            John L. Santos

                            Bug Tracker Team
                            NetMake - IT Solutions

                            Comment


                            • #15
                              Yes John - Thanks

                              Comment

                              Working...
                              X