Executing queries in the main cursor is not recommended, since it is
needed for data management, and its internal props get wiped out when a
non-select statement is execute. There is an internal auxiliary cursor
object used by the Dabo Cursor to handle such statements, such as delete,
update, etc. Perhaps I could modify the Dabo Cursor's execute() method to
check to see if the statement begins with 'select', and if not, pass it
to its auxiliary cursor for execution. I could then add a
bizobj.execute() method that would essentially be a pass-through to its
Dabo Cursor.
Does this sound like it could work for you?
I think typical application should use the following approach:
1. Using user name and password entered in login from, create connection
object as TestSecurityManager class property in validateLogin method. Set
custom connection-level properties if required using execute()
#TestSecurityManager validateLogin method:
self.connection = dConnection(ci)
cursor = self.connection.getConnection().cursor()
#As I understand next line is not safe. Where I should make this setting
common to all
# forms ?
cursor.execute("set search_path to public,company"+companynumber)
2. In MyFormBase afterInit method assign the same connection to form:
self.connection = dabo.dAppRef.SecurityManager.connection
Is this good approach ?
Andrus.
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users