Oracle Forms Java Bean Database Connection - Oracle Forms 10g
821747Jan 24 2011 — edited Apr 12 2011Hi,
I am currently in the process of developing a java bean which:
- needs to use data from the oracle database which it will display graphically (therefore the need for using a java bean in the first place)
- needs to be embedded into an existing oracle forms 10g application through the use of a bean area item
- The java cannot have a hard-coded username and password
I have already developed most of this bean, however, I am using ojdbc14.jar (google it) to connect to the database, which requires a hardcoded username and password.
I need to be able to pick up and continue using the existing DB session already established in oracle forms, and just query data from java as and when I need, without the need to create more database sessions on the DB server.
I have seen examples where records have been queried in Oracle Forms itself and then sent to the bean with the use of SET_CUSTOM_PROPERTY, but due to the fact that there could be any number of rows and records, which would have to be itterated through, put into a string, and then reconstructed in java, I would rather not - it seems like a very messy way of doing it.
Anyone got any suggestions?
Thanks for your time.
Luke