Teemu,

i have never tried it but i have an idea, but first a question: can you use 
web2py's built in history tracking with the authentication to preserve the 
information you need.  i assume you are looking for an audit trail of who 
did what.  i'm assuming you have already considered this so, then my idea...

in your db.py file you probably have a line like:
      db = DAL('sqlite://storage.sqlite')       # if not, use SQLite or 
other DB
(but of course modified for your oracle connection).

or actually in your case it sounds like you have a connection to a mysql 
database for auth, and then a connection to oracle for other data access. 
 you could in db.py do something like:

if auth.logged_in():
  oracle_db = DAL('oracle://%s/%s'%(auth.user.oracle_username, 
auth.user.oracle_password))
  ... define oracle tables here, or maybe in a separate model file...
else:
  oracle_db = None
(sorry for the bad oracle connection string, i haven't used it in a long 
time, but hopefully you get the idea)

good luck!

christian

Reply via email to