[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…

AFTER clicking magnifying glass…

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):

cap1.JPG

cap2.JPG

cap3.JPG

[QUOTE=adz1111;35637]Hi

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

BEFORE clicking magnifying glass…

AFTER clicking magnifying glass…

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?[/QUOTE]
Assuming it’s a grid could you post your SQL code?

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)

Enable debug options under application

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.

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

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…???

[QUOTE=adz1111;35637]Hi

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

BEFORE clicking magnifying glass…

AFTER clicking magnifying glass…

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):

[/QUOTE]

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.

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

Thanks again

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.

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

Hello,

This problem has been solved in release 8.0.045

Thank you!

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

Hello,

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

[QUOTE=jsbinca;36643]@adz1111
That’s why it’s called virtual. :slight_smile:
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[/QUOTE]

Yes John - Thanks