Connect to Database from FORMS API  - Forms 6i

Hi,
We have a requirement of connecting to a Database from the Forms API. I have written few Forms API from the header files provided by ORACLE. But all of those doesnt require to connect to the database.
Now, i have a requirement to connect to a database and query from a table and so on. I hope many of this forum users would have developed many such programs.
Please mail me or post a reply to this thread if you have any sample program of the same from where i can take it up.
Thanks in advance

Thanks Sirotic.
We are using only 6.0.8.14.1. So as per your reply i dont have the jar file at my end.
However with the existing C API's i am not sure whether i can achieve my requirement.
Let me explain my exact requirment.
1) Connect to a DB
2) Execute a Select Query to a table and fetch few values and store in a Variable
3) Assign the value to a Trigger of a ITEM.
Is it possible to achieve this through the existing C API or through the Java API you have suggested us. Its better if you can forward any C API stuff for this, as production environment(s) are running with 6.0.8.14.1
Please confirm on this
Thank you in advance.

Similar Messages

  • Problems connecting with database from java API

    I've benn using XSQLRequest and I found a problem with
    connections, because it can't connect from Java to database, but
    if I access to a .xsql it works.
    And also if I link to a .xsql first and after that I try to
    access to Database form my servlet it works. So I think my
    problem is to initialize the XSQLConfig.xml file in OC4J server.
    Thanks in advance

    Would you provide the way you deploy your XSQL app to OC4J and
    how you get JDBC connection using JAVA? I execute the next code more or less:
    miXSQLRequest = new XSQLRequest(XSQLQuery.getDOM
    (),null);
    miXSQLRequest.process(htParamsIn, pWriter, pErrors);
    but and it's probabily my mistake I don't get any conecction
    from the session or something similar because I thought that
    it's made by XSQLRequest, and the XSQLRequest class takes the
    default values of the connection pool from the file
    XSQLConfig.xml (I put this file inside the lib directory of
    OC4J) as the XSQLServlet.
    Thanks for your help

  • Not able to connect to database from Form builer

    Hi ,
    I installed oracle 10 g in my machine and is accessable from SQLPLUS & TOAD.
    In the same drive i installed Form builder, i am getting the below error when i tried to connect DB from form builder.
    ORA- 12154 : TNS : could not resolve service name.
    Kindly do the needfull.

    not able to connect to database from Form builder

  • Getting exception ORA-12705 while trying to connect to database from forms 9i

    Hello All,
    I have installed 9i database and I gave path for oracle home as Oracle_path while installing. then I installed 9i dev suite, Installer forced me to use different Oracle home, so I gave Odev_path as path.
    I have created server alias name from dev suite to Oracle database and I could connect to database from froms 9i. suddenly it started giving me the following exception when I try to connect database from forms 9i.
    ORA-12705 invalid or unknown NLS parameter value specified
    could some one help toresolve the issue.
    Thanks in advance
    Raj

    I have already seen this document and tried it out, but it didn't work. And I have tried out numerous other tips that I have found in different places on the web.
    Is the client installation of any relevance? I notice that this user has a different installation from the one that I have, and that he amongst other things doesn't have sql plus installed.

  • When connect the Database from Toad , Sqlplus giving the error

    when connect the Database from Toad , Sqlplus giving the error
    recent changes 12.1.1 installatiojn
    Oracle SQL plus encountered a problem and needs to close we are sorry for convenienvce
    Oracle Forms Designner has encountered a probloem and needs to close we are sorry for the convenience
    Thanks & Regards,
    sree

    when connect the Database from Toad , Sqlplus giving the error recent changes 12.1.1 installatiojnHave you tried using the same user via simple sqlplus on the database server or apps tier server itself? Please try the same database user/login on the database server using the sqlplus available on the server itself. See what message do you get. If the the login happens, then try with the tns entry e.g. sqlplus username/password@prod and see if that works on the db server. If both of these conditions work the check where is Toad picking up the tns entry from on the client pc/laptop. If first test fails, then check if the account is locked.
    Hope this helps.

  • Unable to connect to database from D2K

    Hi,
    GoodDay, This is Ramesh. I have loaded both Oracle 9i & D2K in my PC. But i am getting some error message while trying to connect to database from d2k forms. I entered Usename, Password. The message is..
    ORA-12203: TNS: Unable to connect to destination
    The second time i entered both Username, Password & Database.
    User Name: Scott
    Passwors : tiger
    Database: ORCL9i (SID name)
    please let me know where i am lacking..?
    Regards,
    Ramesh.

    Do you connect when you set username , passwd , database....????
    If you can via another tool , for example sql*plus then simply , copy the particular setting tns alias , you use to connect to this db, from [ORACLE_HOME]\network\admin\tnesanames.ora and paste it to [DEV2000_HOME]\network\admin\tnsnames.ora
    Greetings,
    Sim

  • How to connect oracle database from tuxedo

    Hi,
    How to connect oracle database from tuxedo.
    If any one can help me.
    Regards,

    it depends on configuration your going to choose, there are two ways--
    - Using X/Open standards, for this
    you have to make an entry of Resource manager in $TUXDIR/udataobj/RM file.
    Then in UBBConfig file in GROUPS section u have to set Openinfo.
    It also depend on which database you are going to use.
    In your service now you need to call tpopen() API from tpsvrinit() function.
    - Other possibility is, take an implicit connection using Pro*C or Pro*Cobol whatever platform you are using.
    EXEC SQL Connect ...

  • Problem in connecting to database from webdynpro for java

    Hi
    I have a problem in connecting to database from webdynpro application
    I am using oracle 10 express edition as database and was able to connect to database from a java application.But  was unable to connect from a webdynpro for java.
    <b>I guess webdynpro for java uses open sql instead of vendor sql(I looked in the visual admin ,DB is using open sql) so unable to connect to database.Am i right.?</b>
    Do i need to make any settings in the visual admin to make it work?
    How to solve this problem.Please give me pointers
    Thanks
    Bala

    Hi,
    For connecting to Oracle, either you can use the normal JDBC connectivty code directly which is given below :
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@Oracle_server_ip:Oracle port:SID of the Database","user_name","password");
    Statement stmt = conn.createStatement();
    ResultSet rs = stmt.executeQuery("your query");
    In case you want to fetch data through ejbs, these are the steps to be followed :
    1) Open the J2EE perspective
    2) Create an EJB Module project
    3) Right click on ejbModule, create a new EJB (select your EJB type)
    4) While creating the ejb itself, you can add business methods by clicking ‘Next’ in the UI. Another option is after creating the ejb, write the method in the bean, then select the method from ejb-jar.xml -> <bean name> ->method. Right click and select ‘propogate to local & remote’.
    5) Double click on ejb-j2ee-engine.xml. select your bean and specify a Jndi name for eg: “MyJndi”.
    6) Right click on the EJB project and add ‘classes12.zip’ file (provided by Oracle) to it’s build path. (under libraries tab). Also check the same file under ‘Order & Export’.
    7) Create an Enterprise Application project.
    8) Right click on the EJB module project and select add to EAR project, then select the created EAR project.
    9) Right click on the EJB project, select ‘Build EJB Archive’
    10) Right click on the EAR project, select ‘Build Application Archive’
    11) Open the WebDynpro perspective, open a new project, right click on the project ->properties. Do the following configurations :-
    • Java Build path - select the EJB project from ‘projects’ , check the selected project under ‘Order & Export’
    • Project references – select the EAR project
    • WebDynpro references – select ‘sharing references’ tab, click add & make an entry as : <vendor>/<EAR project name without .ear extension>
    You can find the vendor name under ‘application-j2ee-engine.xml’ file of the EAR project. By default it is ‘sap.com’. So if my EAR project’s name is ABC, my entry would look like ‘sap.com/ABC’
    12) Now the configurations are over and the EJB can be invoked by writing the client code inside the webdynpro component. Like:
    InitialContext context = new InitialContext();
    Object obj = context.lookup("MyJndi");
    MyEJBHome home = MyEJBHome)PortableRemoteObject.narrow(obj,MyEJBHome.class);
    MyEJB mybean = home.create();
    int a = 0;
    a= mybean.add(10,15);
    wdContext.currentContextElement().setSum(a);
    where ‘MyEJB’ is my EJB name and ‘MyJndi’ is my JNDI name
    To connect to Oracle , you can write the usual Java code (given below) as a business methos of the ejb (similar to add() method in the example). And access it like mybean.<businessMethodName>().
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@Oracle_server_ip:Oracle port:SID of the Database","user_name","password");
    Statement stmt = conn.createStatement();
    ResultSet rs = stmt.executeQuery("your query");
    Extracted from Re: Webdynpro and Oracle
    http://help.sap.com/saphelp_webas630/helpdata/en/b0/6e62f30cbe9e44977c78dbdc7a6b27/frameset.htm
    May be of use to understand the VA Conf /people/varadharajan.krishnasamy/blog/2007/02/27/configuring-jdbc-connector-service-to-perform-database-lookups
    Regards
    Ayyapparaj

  • Not able to connect RAC database from client

    Hi there
    Recently I have configured RAC in test environment. version 11.2.0.1. OS Redhat 5.9. Everything seems to be fine except not able to connect rac database from client.  Error is as under :
    C:\Documents and Settings\pbl>sqlplus test1/test1@myrac
    SQL*Plus: Release 10.2.0.1.0 - Production on Mon Nov 17 14:29:06 2014
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    ERROR:
    ORA-12545: Connect failed because target host or object does not exist
    Enter user-name:
    myrac =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = rac-scan)(PORT = 1521))
        (CONNECT_DATA =
          (SERVICE_NAME = racdb.testdb.com.bd)
    Please give me your valuable suggestion to  overcome the issue.
    Regards
    Jewel

    user13134974 wrote:
    ORA-12545: Connect failed because target host or object does not exist
    This error means that the hostname or IP address used in the TNS connection string, failed to resolve or connect.
    Your client is making two connections. The first connection is to the SCAN listener. It matches a db instance for your connection request based on service requested, available registered service handlers, load balancing, and so on. It then send a redirect to your client informing it of the handler for that service.
    Your client then does a second connection to this service (a local RAC listener that will provide you with a connection to the local RAC instance). This is what seems to be failing in your case.
    The SCAN listener's redirect uses the hostname of the server that the local listener is running on. Your client needs to resolve that hostname (of a RAC node) to an IP address. This likely fails.
    You can add the RAC node hostnames to your client platforms hosts file. The appropriate action however would be to ensure that DNS is used for name resolution instead.

  • How to Connect Oracle database from excel

    I have installed oracle 11g on Windows 8 64 bit OS  on my laptop. I have Microsoft excel 2013. I can connect to database from SQL and from TOAD. Now  i want - from excel to connect to database.
    Please guide me the steps.
    Thanks

    Below link may be helpful to you :
    http://khalidali-oracledba.blogspot.in/2013/09/connection-between-ms-excel-to-oracle.html
    And if you are getting 32 bit vs 64 bit ODBC driver issue then :
    https://social.technet.microsoft.com/Forums/office/en-US/2234554e-e93c-438b-990a-6739df19da44/odbc-connection-problem-in-excel-2013-64-bit-windows-8-os-and-x64-processor-oracle-8i?forum=excel
    And still you are not able then post the question in :
    ODBC
    Regards
    Girish Sharma

  • How to connect informix database from informatica through JDBC instead of ODBC

    How to connect informix database from informatica through JDBC instead of ODBC.

    Hi mate,
    You may get fast reply for this in informatica forums.
    Thanks
    http://mkashu.blogspot.com

  • Unable to connect to database from forms or reports

    hi friends
    i installed oracle9i database and oracle 9i D2K in 2 different drives with different homes
    i am able to start database and the forms interface but i am unable to connect to the database from forms
    what might be the error please clarify it
    Bye
    Srikumar

    Thanks Farahd!
    <br><br>
    Interesting Info!
    <br><br>
    Raj<br><br>
    <b>www.oraclebrains.com<a>
    <br><font color="#FF0000" size="1">POWERED by the people, to the people and for the people WHERE ORACLE IS PASSION.</font></b>

  • Connecting to a Database from a LiveCycle form

    Good morning everyone,
    I've been working at understanding how to connect to a database via my livecycle form and up to here, i can easilly enough connect to an ACCESS DB.
    I created an ODBC,
    a simple 1 table MS Access DB
    and a simple form that connects to that DB via the ODBC.
    My question is, how do i set this up if i want my clients to use this form? i cant really have that ODBC installed on all their machines, so how can i have this setup instead?
    I do have access to a LiveCycle server, but i only have the Extended reader module installed, nothing else. Can it be done and if so, how would i go about setting this up?
    If i can get that to work, this would open up a lot of possibilities where i work at.
    So what i need is a way to mimic that ODBC setup, but without having to create 5000 ODBC connections on my clients machines
    If you need clarifications on anything, please don't hesitate to  ask.
    Thank you yet again,
    PAtrick

    Hi Patrick,
    You can create a process in workbench which will make the JDBC calls and bring the data (See this - http://help.adobe.com/en_US/livecycle/9.0/services.pdf)
    Then you can use the SOAP endpoint of this process in the LiveCycle form and invoke the process
    Hope this helps.
    ~Varun

  • Upload image to directory and data to database from the same form

    Hello all
    I'm playing at building a shopping cart (never done one
    before) from a tutorial by Gordon Knapp at www.webthang.com.
    I have created the site and it works perfectly. Now I want to
    extend it.
    There is a form that allows the user to add data to the
    database. I would also like to be able to upload an image to a
    directory on the server and add the data to the database at the
    same time from the same form. It would be good if the input field
    "<input name="product_picture" type="text" id="product_picture"
    tabindex="6" size="50" />" could be populated automatically by
    the filename of the image being uploaded, but this isn't a
    neccessity.
    I have looked at various ASP Upload packages and I can upload
    an image alone but none of them make it clear how to upload the
    image and add data to the database at the same time.
    As this is a private project I need any suggestions to by
    free.
    The tutorial shows how to create the site in Ultra Dev but
    worked perfectly well in DW. The page concerned looks like this. It
    is named 'admin_add.asp':
    <%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
    <!--#include file="../Connections/con_ecom.asp" -->
    <%
    Dim MM_editAction
    MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME"))
    If (Request.QueryString <> "") Then
    MM_editAction = MM_editAction & "?" &
    Server.HTMLEncode(Request.QueryString)
    End If
    ' boolean to abort record edit
    Dim MM_abortEdit
    MM_abortEdit = false
    %>
    <%
    ' IIf implementation
    Function MM_IIf(condition, ifTrue, ifFalse)
    If condition = "" Then
    MM_IIf = ifFalse
    Else
    MM_IIf = ifTrue
    End If
    End Function
    %>
    <%
    If (CStr(Request("MM_insert")) = "add_form") Then
    If (Not MM_abortEdit) Then
    ' execute the insert
    Dim MM_editCmd
    Set MM_editCmd = Server.CreateObject ("ADODB.Command")
    MM_editCmd.ActiveConnection = MM_con_ecom_STRING
    MM_editCmd.CommandText = "INSERT INTO products
    (product_category, product_name, product_price, product_briefdesc,
    product_fulldesc, product_picture) VALUES (?, ?, ?, ?, ?, ?)"
    MM_editCmd.Prepared = true
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param1", 202, 1, 50,
    Request.Form("product_category")) ' adVarWChar
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param2", 202, 1, 50,
    Request.Form("product_name")) ' adVarWChar
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param3", 5, 1, -1,
    MM_IIF(Request.Form("product_price"),
    Request.Form("product_price"), null)) ' adDouble
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param4", 203, 1, 536870910,
    Request.Form("product_briefdesc")) ' adLongVarWChar
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param5", 203, 1, 536870910,
    Request.Form("product_fulldesc")) ' adLongVarWChar
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param6", 202, 1, 50,
    Request.Form("product_picture")) ' adVarWChar
    MM_editCmd.Execute
    MM_editCmd.ActiveConnection.Close
    ' append the query string to the redirect URL
    Dim MM_editRedirectUrl
    MM_editRedirectUrl = "admin_control.asp"
    If (Request.QueryString <> "") Then
    If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0)
    Then
    MM_editRedirectUrl = MM_editRedirectUrl & "?" &
    Request.QueryString
    Else
    MM_editRedirectUrl = MM_editRedirectUrl & "&" &
    Request.QueryString
    End If
    End If
    Response.Redirect(MM_editRedirectUrl)
    End If
    End If
    %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN"
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="
    http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=utf-8" />
    <title>Administration - Add Product</title>
    <link href="../scripts/admin.css" rel="stylesheet"
    type="text/css" />
    <script type="text/javascript"
    src="../scripts/ecom.js"></script>
    </head>
    <body onLoad="adminTitle()">
    <div id="wrapper">
    <div id="pageHeading">ADMINISTRATION - ADD
    PRODUCT</div>
    <div id="navBar"><a
    href="admin_control.asp">Control</a> | Add | <a
    href="admin_view.asp">View</a> | <a
    href="admin_update1.asp">Update</a> | <a
    href="admin_delete1.asp">Delete</a> | <a
    href="../Default.asp">Shop</a></div>
    <br />
    <form name="add_form" id="add_form" method="POST"
    action="<%=MM_editAction%>">
    <table border="1" align="center" id="tblArea">
    <tr>
    <td class="tdLabel">Product Category</td>
    <td colspan="2"><input name="product_category"
    type="text" id="product_category" tabindex="1" size="50"
    /></td>
    </tr>
    <tr>
    <td class="tdLabel">Product Name</td>
    <td colspan="2"><input name="product_name"
    type="text" id="product_name" tabindex="2" size="50"
    /></td>
    </tr>
    <tr>
    <td class="tdLabel">Product Price</td>
    <td class="tdContent" colspan="2"><input
    type="text" name="product_price" id="product_price" tabindex="3"
    size="50" /></td>
    </tr>
    <tr>
    <td class="tdLabel">Product Short
    Desciption</td>
    <td class="tdContent" colspan="2"><textarea
    name="product_briefdesc" id="product_briefdesc" cols="47" rows="4"
    tabindex="4"></textarea></td>
    </tr>
    <tr>
    <td class="tdLabel">Product Full
    Description</td>
    <td class="tdContent" colspan="2"><textarea
    name="product_fulldesc" id="product_fulldesc" cols="47" rows="5"
    tabindex="5"></textarea></td>
    </tr>
    <tr>
    <td class="tdLabel">Product Image File Name</td>
    <td class="tdContent" colspan="2"><input
    name="product_picture" type="text" id="product_picture"
    tabindex="6" size="50" /></td>
    </tr>
    <tr>
    <td class="tdLabel"> </td>
    <td align="center"><input type="reset" name="Reset"
    id="Reset" value="Reset Form" /></td>
    <td align="center"><input type="submit"
    name="Submit" id="Submit" value="Add To Shop" /></td>
    </tr>
    </table>
    <input type="hidden" name="MM_insert" value="add_form"
    />
    </form>
    </div>
    </body>
    </html>
    Hope you can help.
    Warm regards
    Martin

    Got it sorted.
    Found an excellent tutorial at Webthang.
    http://www.webthang.co.uk/tuts/tuts_dmx/rob15/rob15.asp

  • How to connect Oracle database from Active Server page

    Hi
    This is srinivas aluri
    I have developed an application using ASP and MS-SQL7.
    Now i want to port this application to Oracle 8i database
    I have written my connection in seperate file called
    connection.inc using SQL OLEDB provider
    If i have to connect oracle database what will be my provider
    and what is the exact code for this connection string
    Here i am giving the code of SQL databse connection string
    strcon= Provider=SQLOLEDB.1;Persist Security Info=False;User
    ID=sa;Initial Catalog=prjdb;Data Source=servername
    i have tried by changing the provider name from SQLOLEDB.1 to
    OraOLEDB.oracle
    but i could not able connect the database.
    It is giving provider not found or not properly installed error.
    But the same code is perfectly working from Visual Basic code.

    it depends on configuration your going to choose, there are two ways--
    - Using X/Open standards, for this
    you have to make an entry of Resource manager in $TUXDIR/udataobj/RM file.
    Then in UBBConfig file in GROUPS section u have to set Openinfo.
    It also depend on which database you are going to use.
    In your service now you need to call tpopen() API from tpsvrinit() function.
    - Other possibility is, take an implicit connection using Pro*C or Pro*Cobol whatever platform you are using.
    EXEC SQL Connect ...

Maybe you are looking for