El 08/11/13 13:23, Paul McNett escribió:
If you want to subfilter the tempcursor from above, it would be:
ds = tc.getDataSet()
ds.execute("select * from dataset where cust_state='CA'")
if ds:
for row in ds:
print ds["cust_name"]
else:
print "no records."
Let's say the tempcursor has a dateTime field, say DTField.
Right now I'm using :
dt = datetime.datetime.now() - datetime.timedelta(days=183)
ds = biz.getDataSet()
ds.filter('DTField', dt, '>=')
and I get my dataSet filtered by a dateTime field.
I am supposing that my original (that is the bizObject's) dataSet
remains unfiltered and untouched (it is linked to a browse control while
I'm using this one to generate a report).
If I were to go the execute() way I guess I would loose the advantage of
dealing with dateTime values. I would have to transform dt to an int,
then check out how is dabo persisting the "T" field type and convert it
to an int with the functions provided by the query language and then
compare both values in a where. Or am I wrong?
If I were to go the getTempCursor() way I would have the same issue plus
I would not be able to refer to "dataset" having to code inside the
query the virtual fields I have already defined in the bizObject, thus
having two pieces of code in different places that are supposed to do
the same thing. Don't like it.
Are my considerations correct? Or am I missing something?
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/[email protected]