Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 4 of 4 total |
TEDBDataSet.filter |
Thu, May 3 2007 5:36 PM | Permanent Link |
"Royke" | We may have found two problems with Dataset.filter expressions that used to
work under the BDE. Both give a #700 error. dataset.filtered := False; dataset.filter := '[stringfieldname] = ' + QuotedStr('SomeString'); dataset.filtered := True; trips over the first '[', message something like 'expression expected, but '[' found'. It works after taking the square brackets out. Should it not be possible to use the brackets? dataset.filtered := False; dataset.filter := 'booleanfieldname = ' + QuotedStr('True'); dataset.filtered := True; Again #700, 'Expected Boolean, SmallInt, Integer or BigInt expression, but instead found 'True' '. This works dataset.filter := 'booleanfieldname = ' + 'True'; Life ain't easy without Help ... Roy |
Fri, May 4 2007 3:23 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Royke
In DBISAM V3 both would probably worked. ElevateDB is far stricter about adherence to the standard. Field names surround with double quotes if they have spaces in them otherwise nothing. A boolean field needs to be compared with a boolean not a string. You will also find things like field ='' (ie quote quote) is no longer a useful test since '' no longer translates to null Roy Lambert |
Fri, May 4 2007 4:03 AM | Permanent Link |
"Harry de Boer" | Roy
A boolean cannot be compared to a string. In the filter you can thus use:. dataset.filter := 'booleanfieldname = TRUE'; Regards, Harry "Royke" <royke@canada.com> schreef in bericht news:2FCFF560-4211-466F-9136-44B8C4B144F7@news.elevatesoft.com... > We may have found two problems with Dataset.filter expressions that used to > work under the BDE. Both give a #700 error. > > dataset.filtered := False; > dataset.filter := '[stringfieldname] = ' + QuotedStr('SomeString'); > dataset.filtered := True; > > trips over the first '[', message something like 'expression expected, but > '[' found'. It works after taking the square brackets out. Should it not be > possible to use the brackets? > > dataset.filtered := False; > dataset.filter := 'booleanfieldname = ' + QuotedStr('True'); > dataset.filtered := True; > > Again #700, 'Expected Boolean, SmallInt, Integer or BigInt expression, but > instead found 'True' '. This works > > dataset.filter := 'booleanfieldname = ' + 'True'; > > Life ain't easy without Help ... > > Roy > > > |
Mon, May 7 2007 2:29 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Roy,
<< dataset.filtered := False; dataset.filter := '[stringfieldname] = ' + QuotedStr('SomeString'); dataset.filtered := True; trips over the first '[', message something like 'expression expected, but '[' found'. It works after taking the square brackets out. Should it not be possible to use the brackets? >> Brackets are no longer supported because they are reserved in SQL 2003 for array declarations and element references, which EDB will have eventually. << dataset.filtered := False; dataset.filter := 'booleanfieldname = ' + QuotedStr('True'); dataset.filtered := True; Again #700, 'Expected Boolean, SmallInt, Integer or BigInt expression, but instead found 'True' '. This works dataset.filter := 'booleanfieldname = ' + 'True'; >> Boolean literal values cannot be enclosed in quotes. << Life ain't easy without Help ... >> The filter syntax is the same as with SQL expressions, so you should refer to the SQL manual for this information. You can find literal value examples under each of the Types topics here: http://www.elevatesoft.com/edb1sql_types.htm -- Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Monday, May 6, 2024 at 03:23 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |