Comments (5)
There are also some more incompatibilities, but VO's behavior looks crazy for most, so not sure if we should deal with those:
-
Passing the string as filter to the first param (which should accept a codeblock) of DBSetFilter() with for example DBSetFilter("alltrim(fld)=='bbb'") results to a runtime "Syntax Error" in VO, with message "Error setting filter". In X#, this works without errors, even though the type of the argument to the function was wrong. Not sure if we should change that.
-
For some bizarre reason, VO for this code:
DbSetFilter(,".T.")
DbGotop()
? EOF()
DbSetFilter(,".F.")
DbGotop()
? EOF()
DbSetFilter(,"1==2")
DbGotop()
? EOF()
DbSetFilter(,"1==1")
DbGotop()
? EOF()
DbSetFilter(,"SOMEINVALIDFILTER")
DbGotop()
? EOF()
returns T,T,T,F,F for DBFCDX and F,F,F,F,F for DBFNTX!!! None of the two make any sense, so I guess we should ignore this.
from xsharppublic.
- When you pass a string as first parameter to DbSetFilter() then we convert that to a codeblock and assume you meant to pass it as second parameter. This should not harm I think
- These should not produce an exception. Will fix that.
from xsharppublic.
Robert, sorry, the "runtime exception" comments in the code in #1489 (comment) were a leftover from previous tests, will fix that. None of those produce an exception in X#, it's just different behavior to (the very bizarre behavior of) VO.
X# produces a runtime exception only for the original report #1489 (comment), DBSetFilter() with whitespace for the filter string, which is the main problem.
from xsharppublic.
The problem with the white space should be fairly easy to fix.
There is already the following code:
FUNCTION DbSetFilter(cbCondition, cCondition) AS LOGIC CLIPPER
LOCAL sCondition AS STRING
LOCAL cbCond AS CODEBLOCK
if PCount() == 0 .or. (cbCondition:IsNil .and. cCondition:IsNil)
return DbClearFilter()
endif
We can add a condition there to test for an empty string.
from xsharppublic.
OK, done, but this exposed a deeper serious issue with DBSetFilter(), I opened #1493 for it
from xsharppublic.
Related Issues (20)
- Implement GoToBrace action in the VS editor HOT 1
- SQLExec returns -1 even when success
- [VFP dialect] Compatibility: Add an IN clause to the USE command HOT 1
- [Documentation] Add a syntax description of USE commands for VFP dialects. HOT 1
- Collection Class doesn't increase the Count property when adds an item.
- [VFP] Problem with APPEND FROM FOR command HOT 2
- [VFP] Problem with COPY TO ARRAY / DbCopyToArray() with fields of type "G"
- [VFP] Misleading line number reported in compiler error about requiring the /memvar option HOT 1
- [VFP] cannot use the arr[ind1][ind2] syntax to access array members in VFP dialect HOT 3
- [VFP] COPY STRUCTURE FIELDS not recognized
- [VFP] SCATTER/GATHER MEMVAR MEMO not recognized HOT 4
- [VFP] Problems with the INDEX ON command HOT 6
- [VFP] SCATTER/GATHER problem with FIELDS LIKE clause
- [VFP] Missing functions in the runtime
- [VFP] Problem with CURSOR HOT 5
- VS-Integration - Indentation
- FieldPut in a table without data records - Error 5068: There is no current data record, but no exception in VO. HOT 6
- Some issues with indexed PROPERTY SET and ASSIGN HOT 2
- No warning about missing RETURN value in the VO dialect
- Format document no longer working in VS 2022 17.11.0
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xsharppublic.