Using predefined JDBC database connection in runtime for BC4J

I've created an aplication using BC4J context, however I want to have several distinct users acessing this aplication, so I create the connection to the database using stantart JDBC 2.0, and now I want my application to use this connection instead of the one defined for BC4J.
The database user owner of the objects must be locked.
Is this possible?
Many thanks.
Nuno

In Forms I used the following code to change the user at runtime. I created 3 char fields 'u','p' and 'c' for username, password and connect string respectively.
declare
uname varchar2(10);
begin
uname := get_application_property(username);
-- To display your current username
message(uname);
pause;
logout;
logon(:u,:p| |'@'| |:c);
end;
Have a nice day,
Abhijith Unnikannan,
Oracle Support Services

Similar Messages

  • JDBC database connection

    G'day XI experts,
    can the JDBC database connection be same for all the Environments( for e.g. dev, test, mirror and prod)?
    please advise.
    thanks in advance.

    Hi,
    Obviously the CC will be same for all environments but only connection parameters will change from env to env.
    If your landscape is having different databases for every envrionment, accordingly the connection parameters need to be changed in your CC. In other words CC need to be changed according to your database..if your landscape is using a single database instance for all your environments then..your CC will remain same otherwise your CC need to changed according to your database instance.
    Hope this is clear.
    thanks
    Hamja

  • Set password for database connection at runtime

    Hi there,
    is it possible to set the password and/or the user for the database connection at runtime.
    The use case is to read the values from a file and decrypt them, and the to establish the conenction. So that i don't habe to redeploy everything if there is a change.
    Thanks in advance.

    How exactly do i set these values for the datasource?
    Edited by: Alex on 15.02.2012 09:50
    €: JDeveloper 11.1.1.5.0
    The use case is, that there is a file with an encrypted password. This should be decrypted and then be used for the connection. So when this encrypted passowrd changes, i don't want to edit and deploay the app once again. Instead the new encrypted password should be decrypted via code an then be used.
    Edited by: Alex on 15.02.2012 10:00

  • How to use JDBC database connection in Solaris

    Hi all,
    I am new to Solaris and i want to create an application using JDBC database connection.
    I want a small piece of code, probably a login page code that verifies the username from a OpenOffice database (.odb) file. I am particular to know the driver name, etc. If possible give the code using JNDI loopkup.
    Thanks in advance,
    Parasou.

    Sure no problem.
    Please stand by while I do your work for you.

  • CR4E - New JDBC (JNDI) connection at runtime

    Is it possible to create a new JDBC (JNDI) connection at runtime using the propertyBag to set the attributes?  I tried this but received error message stating "error finding jndi name".

    Are you specifying a JDBC or JNDI connection?
    If JDBC, did you set the (Optional) JNDI Connection property?
    If you set the JNDI property for the JDBC connection, it'll try connecting to the JNDI.
    The JDBC has the optional JNDI property, so that you can design a report against JDBC, then use the JNDI when deployed to a J2EE.
    Sincerely,
    Ted Ueda

  • Different database connections at runtime

    How can I change different database connections at runtime on the same Application Module ?
    I use BC4J as business layer and uiXml as presentation layer.

    Does anyone know how to do this?
    I need the same, but i couldn't find any documentation about it.
    Looking forward to hearing good news.....

  • Error in OFR : "No database connection string set for connection group"

    Hi all..
    In OFR, Batches Fail To Export When Line Pairing is Enabled and Batch Remains in State 750 With Error "No database connection string set for connection group".
    I have followed all steps associated to line pairing with database still my batch is not exported..
    Any help is appreciated..
    Thanks in advance

    Hi,
    in case you haven't done this already: for this problem we'd really need you to open a CSS message.
    From your problem description it sounds likely that LCA routines and liveCache user don't fit together. Please check the solution of note 811207 to see if that assumption is correct.
    Furthermore: liveCache 7.5 and SCM 4.0 are not released together (yet). When using SCM 4.0 only liveCache versions 7.4.03 Build XX are released. This it seems you're current combination is not supported!
    Please take a look at PAM (Produkt Availability Matrix) on the SAP Service Marketplace to see which combinations have been released.
    Kind regards,
    Roland
    Message was edited by: Roland Mallmann

  • How to use Forms Default Database Connection in java class

    When a form based application is started, a connection is made with underlying database. This is the Default (Primay) Database Connection.
    The problem is I have some of my business logic implemented in a java class. In this class I have to make a another connection with the same database. What I want to do is to use the original Database Connection in the java class. In this I may avoid the overhead of reconnection.
    Could anyone pls guide me in this way...

    you can't share the forms connection. Sorry :(

  • Dynamic database connections at Runtime dbAdapter

    Hi
    I need to connect to a database defined a runtime in a BPEL process using the dbadapter. All the configuration parameters for making the connection are provided at runtime (connectionURL, User, Password) and i need a way to configure them in the dbAdapter make the connection and execute some SQLStatements.
    Until now we were testing with some bpelx Properties changing dynamically the name of the jndi (jca.jndi) that works fine, but we cant define a datasource for every database. We also tried with another set of properties for setting the connection at runtime (jca.mcf.ConnectionString, jca.mcf.Password,jca.mcf.UserName) unsuccessfully.
    Do you know a way to define connections parameters at runtime in dbAdapter? Is that possible with SOA version 11.1.1.6 ?
    If this is not possible what alternative do you suggest for making dynamic connections to a database.?
    Regards
    Sergio

    You can try using the function query-database and formulate the 4th parameter which is JDBC connect string at runtime.
    oraext:query-database()
    Returns a node-set by executing the sql-query against the specified database. The second parameter rowset indicates if the rows should be enclosed in a element. The third parameter row indicates if each row should be enclosed in a element. The fourth parameter datasource is either a JDBC connect string (jdbc:oracle:thin:USER-NAME/PASSWORD@HOST:PORT:SID) or a JNDI name for the database. Only Oracle Thin Driver is supported if JDBC connect string is used. Usage: oraext:query-database(sqlquery as string, rowset as boolean, row as boolean, datasource as string). Example: oraext:query-database('select last_name from employee where id=1234',false(),false(),'jdbc:oracle:thin:scott/tiger@localhost:1521:ORCL'.
    This does not require a database adapter .

  • ADF Database Connection at Runtime

    Hi,
    I have developed a ADF based Web Application, deploy the code into different appServers [connecting to Different Databases] but unable to connect to the Required Database at Runtime.
    I have the following in my dataSources.xml & web.xml which looks like this.
    dataSources.xml
    <managed-data-source connection-pool-name="AIAQueryConnectionPool" jndi-name="jdbc/AIAQueryDataSource" name="AIAQueryDataSource"/>
    <connection-pool name="AIAQueryConnectionPool">
    <connection-factory factory-class="oracle.jdbc.pool.OracleDataSource" user="aia" password="aia" url="jdbc:oracle:thin:@//occf09.techmahindra.com:1521/ftsit"/>
    </connection-pool>
    web.xml
    <resource-ref>
    <description>AIA data source connection for FastTelco</description>
    <res-ref-name>jdbc/AIAQueryDataSource</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    <res-sharing-scope>Shareable</res-sharing-scope>
    </resource-ref>
    deployed the web Application "TestTransaction" and created ConnectionPool & DataSources for this Application "TestTransaction"
    when i run the Application i am unable to connect to the required Database/(s)
    Is that correct what i was doing ?
    BUT If i have the entry of that specific Database in ./model/common/bc4j.xcfg file i am able to Connect to the Database
    and if i remove the entry from ./model/common/bc4j.xcfg file, I am unable to Connect to the Database.
    Why is it so ??
    Can anybody give me the process / code to Connect to the Database in web based ADF Application at Runtime.
    or
    Pick up the Database Configuration Values from a Properties file and establish a Database Connection ??
    thanks in Advance...
    regards,
    anvv sharma

    Hi,
    I got it working today and not yes'day to the modifications suggested by arun...the only difference being i have stop / start the Application then it started with the working what i have done yes'day
    also thanks for shay....... it was useful link
    regards,
    anvv sharma

  • Java database connection method class for review

    Can you guys tell me any specific coding standard has to be followed here(i guess i need not hard code the pwd's)
    import java.sql.*;
    public class DBLocator {
         * Obtains and returns a connection to database
         * @return database connection
         public static Connection getConnection() {
         Connection con = null;
         try {
              Class.forName("com.informix.jdbc.IfxDriver");
              String url = "jdbc:informix-sqli://151.140.160.201:1527/ssde_db:INFORMIXSERVER=ssde_infx";
         con = DriverManager.getConnection(url,"haha06","123123");
    } catch (ClassNotFoundException e) {
                   System.out.println("Driver not found");
              } catch (SQLException e) {
                   System.out.println("SQL exception");
                   e.printStackTrace();
              return con; // returns connection
    }

    Can you guys tell me any specific coding standard has
    to be followed here(i guess i need not hard code the
    pwd's)More than just the passwords. Why are the driver class and URL hard-coded?
    I wouldn't use this class. It's not very useful as written. It's a poor abstraction for one. There's lots of other useful things that you could include, like methods for closing and rolling back a connection, closing a statement and result set. You don't log any exceptions or messages. You preclude the use of a connection pool managed by an Java EE app server.
    %

  • Use of oledb database connection in input form of process

    I've created dynamic pdf form with data connection to mssql database and with script that automatically adds rows to table and fills fields.
    When I try to open this form as input form for my process in workspace it generates an error: Unable to create SOM expression. That means that sql database connection works not properly.
    How can I fix this? Is it possible to use data connection to oledb database in the input form?

    Hi,
    I have a form that includes db connection (OLDB ->Access). But in
    workspace I have an error while initiating it. The error is an Adobe Acrobat message;
    "Unable to create SOM expression $record.tablename.fieldname"
    I am using Acrobat 9 pro ext. and when I use reader then there is no problem.
    I removed enhanced security settings in preferences of Acrobat. What else i can do? Any suggestions?
    Thank in advance..

  • Need help Crystal Reports running in BO 4.1 while using Universe as database connection.

    Sorry, I may not know how to describe this in the correct technical manner, but I'll explain in as simple terms as I can.
    I open up Crystal Reports 2013 click new document
    and it begins to ask for Database Expert.
    I select Universes and log in to my Business Objects Enterprise Explorer.   I then select the Universe that I want to write my report with,
    then i save the rpt on my local machine.
    then I log into my Business Objects 4.1 CMC or BI and upload this rpt file so that I can begin to schedule the report for example...
    but the problem i have is whenever I try to run the report, 
    it asks for a prompt for my database connection...  
    it displays the Universe name, but User Name Password, I am not sure what to write,
    do I write My login for Business Objects?  do I write the user name password of the database that Universe uses?
    in CMC I see a database configuration,  I tried many combinations and still have been receiving the following error message
    The viewer could not process an event. The database logon information for this report is either incomplete or incorrect. []
    ---- Error code:0 [CRWEB00000119]
    From all I read the point of using the Universe in Crystal reports is to be automatic in such a way that it doesnt need the database conneciton, because its technically using the Universe as the database connection....
    so what am I doing wrong here?    maybe its my database configuration,    I keep reading that it doesnt need anything...   that you upload the Crystal Reports and it would just work...
    any help with this issue would be greatly appreciated..
    thanks
    -Daniel

    Hi Daniel,
    What is the reporting DB used?
    The trick with your configuration is the following:
    - Universe Designer: 32bits application that may work fine on your desktop
    - Crystal 2013: 32bits application as well
    - When you export to the repository, Web Intelligence (64bits) has to process the Universe to extract the query.
    Your server should have the drivers required for Crystal + Universe: 32bit and 64bit versions.
    See more details on this KBA:
    https://service.sap.com/sap/support/notes/1821625
    Regards,
    Julian

  • Choose Database Connection at runtime?

    I have a few databases with the same structure but different content. In fact it are databases from the same application, but from different customers.
    But the choice of the database connection is part of the VC model.
    What will be the easiest way to use the same model with different databases?

    Hi
    I think that you should create seperate systems for each DB and then in your VC model use guard conditions to allow access to the specific data base.
    Jarrod Williams

  • Changing Database connection at runtime in CR2008

    Hi,
    I have a VS2008 application which is using CR2008 to generate pdf reports for the user. Problem is I am not able to change the database connection to any server other than the one that was used to create the report template.
    My environment has CR2008 SP2. I have tried reports with no paramter as well as the ones with parameters both dont seem to work.
    I have already tried a couple of things:
    a) report document refresh after loading it
    b) setting the database connection as
    this._crReport.DataSourceConnections[0].SetConnection(dbServerName, dbName, dbUserId, dbPwd);
    c) setting the database connection as
    tbls = this._crReport.Database.Tables;
                    bool test = false;
                    foreach (Table tbl in tbls)
                        tblLogonInfo = tbl.LogOnInfo;
                        tblLogonInfo.ConnectionInfo = connInfo;
                        tbl.ApplyLogOnInfo(tblLogonInfo);
                        test = tbl.TestConnectivity(); ** note this alwys return a true for the changed database server
    I have read a couple of thread but none has worked for me...Is this a known issue with CR2008?
    Thanks
    Kajal

    Hi Kajal,
    I am assuming that you are not changing the schema of the report at any point of time. I would suggest you to try pointing to the other database through designer to make sure that you can hit the database and the schema is correct. You can also create a udl file to check the database connectivity.
    Then just for testing purpose you can try the following code:
    ReportDocument reportDoc = new ReportDocument();
    reportDoc.Load("path of the report");
    reportDoc.SetDatbaseLocation("uid","pwd","Servername","tablename");
    reportDoc.SetParameterValues("Parameter-Name","values");
    CrystalReportViewer.ReportSoure=reportDoc;
    Does that help?
    Thanks.

Maybe you are looking for

  • How I can eliminate commas in a concatenation when the records is not there

    I am getting these results Holly Eliza Congdon, 2002, Son, John Harvey , 1981, other, , , Peter Allen, 1966, other, Duke Beardsley , 1992, other, , , Nellie Wood, 2011, Son, , , , , , Shawn Burns, 1986, other, , , , , , Jay Taylor, 1977, , , , , , ,

  • ADF: How to find out if a button is clicked?

    Hi, I want to check if a button is clicked/selected and specify that condition as something like: #{backingBeanScope.backing_SearchLog.cb1 eq true}  in the refreshCondition of one of the viewIterator. Kindly let me know how to check if the button is

  • "unsupported syntax for refreshRow  ()"

    Hi everybody! I've got a problem with a JDBC-Application I wrote for Oracle 8i. Since migrating to Oracle 9i, it displays after the 10th call to ResultSet.next() an error message "unsupported syntax for refreshRow ()" and it seems to end the connecti

  • Where is tunisia map in nokia ovi suite?!

    hi,i don't find tunisia between  maps in nokia ovi suite?! where the bugs,please heeelp for downloadmap of my country Solved! Go to Solution. Attachments: tunisia not found.JPG ‏69 KB

  • Cancel post goods issue..............

    How do I cancel post goods issue?Process of how it happens?pls tell me.