I want to query the database from within a form which already has a
bizObject defined.
In the wiki HowToCreateATempCursor page recommends using getTempCursor()
stating that "The above will not change/touch/overwrite the
CustomerBizObj data.".
In the wiki DataSet page we get a DataSet and then we use execute() to
perform the query, with the added advantage that we are able to query
the bizObject's table by using "dataset" to refer to it, and other
dataSets by using a dictionary of dataSets. This is nice because if I
have virtual fields defined I can query them without having to worry
about them.
But in the API page (at paul.dabodev.com) of the bizObject I can read
about execute() "Execute the sql on the cursor. Dangerous. Use
executeSafe instead." and we also have an executeSafe() which says "This
is considered 'safe', because it won't harm the contents of the main
cursor.". Now I understand the bizObject is not the same as a DataSet,
but in the same API site under dCursorMixin I can see both methods
execute() (without the "Dangerous" warning) and the executeSafe() method
which says it is "safe" (that would imply that execute() is not(?)).
So I'm sitting here wondering about the hidden dangers (not specified
anywhere) of issuing a query.
I will probably use the dataSet.execute() method as it allows me to
query the bizObj defined view but I would like to be sure.
"There should be one-- and preferably only one --obvious way to do it."
--- StripMime Report -- processed MIME parts ---
multipart/alternative
text/plain (text body -- kept)
text/html
---
_______________________________________________
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]