Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

little-big problem...

edited March 2006 in General
Hi!

I'm using DBISAM with RBuilder Pro 10.01.
I need to change the Report "QueryDataView" at runtime.
I use the "CreateAutosearchCriteria" procedures to add criterias to the SQL
query, but I have one big problem with this using DBISAM (not with Paradox)

If I add a AutoSearch criteria, the criteria is added between two " "
(double quotes)
With Paradox there is no problem, because "A" is equal to 'A'.

BUT with DBISAM, "A" is not a valid syntax.

How can I fix it? Is it better to contact DBISAM to change its SQL syntax,
or can I modify a RBuilder .pas file?

There is a thing I don't understand...
With the SQL Designer, if I add search criterias with it, the criterias are
added with a single quote, but using CreateAutosearchCriteria they are added
with double quotes. Why?

Comments

  • edited March 2006
    Santy,

    This caused me some grief when I first came across the issue. This occurs
    to handle the possibility of commas in a string. The following is an
    example of the syntax needed to build a soBetween criteria:

    DateTimeRange := '"' + StartDateTime + '","' + EndDateTime + '"';

    --

    Bob

  • edited March 2006
    Hi, Bob...

    Thanks for the tip, but what about other criteria types?
    I get the error with simple "soEqual" criteria. They are always added with a
    "double quotes", and DBISAM doesn't understand them


  • edited March 2006
    Ok, I solved it with a simple...

    TdaQueryDataView(lDataView).SQL.SQLType:=sqSQL2;

    ...before adding the SearchCriterias.


This discussion has been closed.