Problem with dblink in Oracle Forms 6i

I hava a problem and i try to compile a form that use a dblink when i start to compile the form the IDE is close and no errors are shown. That someone know what can i do for it ??...
The Dblink is defined like this way:
sqlstr := 'SELECT ' ||
The_Columns ||
' FROM STITXS.CSI_0_DAY_ONE_GROUP@IMM DOG, CSI_0_AREA_TAX ATA ' ||CHR(10)||
wFilter || The_Grp_Columns;
this part of code is generating the query dinamically, but i can't compile the form, i just need to change the schema for STWBMS.CSI_0_DAY_ONE_GROUP@IMM and also if i remove this part of code that use the dblink the form compile without problem.
The version of mi Bada base is Oracle 9i, but the system (Oracle Form) in my enviroment use Oracle DataBase 8i.
I hope someone can help me.
Thanks

You could try to "hide" the db-link by creating a local view above the dblink-table.

Similar Messages

  • Problem with PJC (Print Dialog) - Forms 10g

    I have a problem with my PJC for Forms 10g r2. When I try to connect and run my PJC (raise Print dialog and put printer name in some text item) I get following message:
    oracle.forms.net.ConnectionException: Forms session <2> aborted: unable to communicate with runtime process.
         at oracle.forms.net.ConnectionException.createConnectionException(Unknown Source)
         at oracle.forms.net.HTTPNStream.getResponse(Unknown Source)
         at oracle.forms.net.HTTPNStream.doFlush(Unknown Source)
         at oracle.forms.net.HTTPNStream.flush(Unknown Source)
         at java.io.DataOutputStream.flush(Unknown Source)
         at oracle.forms.net.StreamMessageWriter.run(Unknown Source)
    When I started application, on Java console I saw this message, so I think the server configuration is fine (I change everything I need in Default.env and FormsWeb.cfg files):
    Loading http://devsrv/forms/java/jESPrintDialog.jar from JAR cache
    What can I change with server configuration or deploying my project to this PJC can work normaly?
    Thanks....

    Hi and thanks!
    I resolve one part of my problem. Tt was about diferent compiler (in JDeveloper 10.1.3 compiler is 1.5 and in my oc4j server JRE is earlier version, so it can`t work normaly).
    I comiled PJC in 1.4 version of compiler and now I can start and run my PJC.
    But, there is another problem:
    this is my part of java code (note: everything work fine except one line when I want to get printer name from select printer dialog):
    try {
    boolean b;
    PrinterJob job = PrinterJob.getPrinterJob();
    b = job.printDialog();
    try {
    return job.getPrintService().getName();
    catch (Exception e) {
    System.out.println("Error: "+e.getMessage());
    return "My error:";
    } catch (Exception e) {
    System.out.println("ERROR: " + e.getMessage());
    return "Problem with PJC [esoft]";
    So, when pjc want to get back printer name
    return job.getPrintService().getName();
    i get following error (on Java console):
    java.lang.NoSuchMethodError
         at happypjc.PDialog.getProperty(PDialog.java:50)
         at oracle.forms.handler.UICommon.onGet(Unknown Source)
         at oracle.forms.engine.Runform.onGetHandler(Unknown Source)
         at oracle.forms.engine.Runform.processMessage(Unknown Source)
         at oracle.forms.engine.Runform.processSet(Unknown Source)
         at oracle.forms.engine.Runform.onMessageReal(Unknown Source)
         at oracle.forms.engine.Runform.onMessage(Unknown Source)
         at oracle.forms.engine.Runform.processEventEnd(Unknown Source)
         at oracle.ewt.lwAWT.LWComponent.redispatchEvent(Unknown Source)
         at oracle.ewt.lwAWT.LWComponent.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    Can you give me some hint about it. Everything is OK now, except this (very important) peace of code!
    best regards
    mret

  • Problems with filling out PDF forms

    We have problems with filling out PDF-forms. Aotomatic filling of forms is deactivated and we use the Adobe Reader 11.0.05. The problem is: After some time the inputs are wrong put down in the form. For example: I write 120 and in the form stands 125. We have already extinguished the cache. Thanks for your help in advance.

    You will get that first message when the document has been changed in a way that invalidates the internal digital signature that's applied when a document is Reader-enabled. Certain changes are allowed (e.g., filling fields, commenting, signing) and will not invalidate the signature, but others are not. The exact cause of the change is often hard to track down, but it can be due to font problems, some type of file corruption, or something that Acrobat/Reader attempts to correct when the file is opened/saved. You will also get the message if the users system time is not correct and is currently set to some time before the document was Reader-enabled. It seems best to use the most recent version of Acrobat to enabled the documents and recent versions of Reader to work with them.
    It problem is probably not related to the user using anything in the Sign pane.

  • Problem with implicitly created Oracle pipes

    Hi, I am having a problem with implicitly created Oracle pipes. I am not sure if this is the correct forum for this topic, but I could not see one which suited better..
    I am using Oracle pipes as a commiunication mechanism between processes (some are written in PL/SQL and other in PRO*C).
    The general problem I have is that if a timeout occurs during the communication process, I end up with 1 or perhaps 2 implicitly created pipes.
    The biggest problem for me is that I am unable to determine if a create is implicitly created (via dbms_pipe.send_message or receive_message). This causes problems, since these implicitly created pipes are left behind and not deleted. I'll show you the basic flow of the processes and you shall see my problem.
    server: create request pipe "req_pipe"
    server: listen for request on requests pipe.
    client: create two pipes for comms with server.
    client: send request and the names of the newly created pipes to the server.
    server: read request and pipename from request pipe (from this point all comms between the client and server are now done over the 2 pipes the client created).
    server: send ack message to client to ensure they are still there (since requests can be queued in the request pipe and clients could have timed out before the request is received)
    client: send "i'm still here" ack back to the server.
    server: process request and send result back to client.
    client: send ack back to server to let server know we have received the response.
    server: send ack back to client to show that work is now committed.
    OK thats the general event flow. I use the rule, that pipes created by a process are removed by a process. So the client always removes the pipes it created in all situations. But since this can happen at any point we can get in the situation:
    client: timeout occurs, delete pipes.
    server: send message to client (creates an implicit pipe) and therefor works (no errors raised)
    server: do a read for response from previous message. (implicitly creates pipe) (will fail).
    Now we have two implicitly created pipes! These pipes will exist until the database instance is shutdown, and in a poorly performing environment, we could get thousands of these pipes lying around... not a good situation.
    How can I either stop pipes being implicilty created, or how do I detect if a pipe was implicitly created.
    I have tried a couple of things, like using v$db_pipes to check if a pipe exists before doing send/reveive calls but this is FAR to slow to do a select on that view.
    We have also looked at keeping a record of pipes created by the client then have some process (perhaps the server) clean up these pipes after some time frame. This is a workable solution but is not favourable since it adds extra overhead having to check these pipes often, and created an extra level of complexity which is not required..
    Any suggestions will be greatly appreciated.
    Feel free to email me with any suggestions on my email provided below, or just post a reply to this formum..
    Many thanks,
    Karl Bridger
    [email protected]

    I solved the problem by changing the SOAP massage format from Document/Wrapped to Document/Literal

  • Problems with Download of Oracle IFS /IFS Devkit for NT

    I am having problems with download of Oracle IFS and Oracle IFS Devkit for NT.
    When I ran the ifsdevkit.bat file the last four files did not get copied over. Subsequently when I ran the upload_ifsdevkit batch file as indicated in document I got error message saying
    'System cannot find the path specified'.
    When I opened the batch file it is looking for BIN directory under the C:\OraHome1\ifs directory but none exists. I wonder if this is the cause of problem. This would mean that the ifs1081.zip file has a bug in that it did not create the BIN directory and files under C:\OraHome1\ifs
    Would appreciate if somebody can help. Thanks
    null

    Is C:\OraHome1 your ORACLE_HOME directory? (Usually, it's C:\Oracle\Ora81)
    Also, have you installed iFS (successfully) in that ORACLE_HOME? If so, you are guaranteed to have an %ORACLE_HOME%\ifs\bin directory.
    Finally, did you enter the correct directory as the parameter to the DEVKIT script?

  • Problem with Oracle8i Lite and Forms 6i

    Problem:
    I have installed first Oracle8i Lite Version 4.0.0.2.0 on my computer witch has no network card and it works wery well with The Open Client Adapter (OCA).
    Then, I have installed Oracle Forms and Reports Release 6i, and from this moment, I get this message : "OCA-30002: ubofscr function not supported".
    In the release notes, I can read :
    "OCA Release 6.0.5.3.0 is installed for compatibility with Oracle Required Support Files version 8.0.5. If you install newer client tools which upgrade your Required Support Files to version 8.0.5.1, you may experience an error message, "OCA-30002: ubofscr function not supported". To upgrade OCA to correct this problem, copy the OCA605290.zip file from the \WIN32 folder of the Oracle8i Lite CD-ROM, unzip it and follow the instructions in the README.TXT file which it contains."
    But on my Oracle8i Lite CD-ROM, there is no OCA605290.zip file from the \WIN32 folder.
    What can I do ?
    null

    You could try to "hide" the db-link by creating a local view above the dblink-table.

  • Problem with synchronize in web form

    I'm runing forms server 6i with patchset 11...
    I'have a java bean wich extends VTextField, wich opens a file dialog and returns the path+filename selected...
    I have a navigable text item whose implementation class is this one for file dialog...
    Java class returns ok the filename in text item,value shows up in the screen...but if I try to process the value returned in the text item,I receive null..i've even attached a when-validate-item trigger with the code: :text_item:= :text_item ...I have enough 'synchronize ' inserted all over the pl/sql code...the only situation when I receive the value is when I raise a message,or alert in the screen...after this :text_item holds the corect value...However this is annoying,as my customers want this alert removed...
    does anyone has a idea about how can I notify forms about the wright window to synchronize with???
    Does Forms management team Knows something about this?If it is a bug,I wan't to know so I won't lose any more time....

    Thanks Duncan
    This last solution with using the Handler is working,the internal value is updated...however,the screen value of the PJC is nor updated...
    I'm using
    this.setProperty(ID.VALUE,fileDirectory + fileName);
    try
    mHandler.setProperty(ID.VALUE,fileDirectory + fileName);
    catch (oracle.forms.api.FException fe)
    fe.printStackTrace();
    System.gc();
    return true;
    I thinck I'll use that workaround with the get_custom_property....
    However,if you're here,I thinck I have some other problem:
    I have created a pjc on the forms wich imports or exports one line (identical with text_io package)
    This pjc is managed by a pl/sql package also created by myself...from the pjc I'm sending custom events to the forms:endoffile,invalidinfile,invalidoutfile...all works ok,but if a try to import a whole file(performing a loop in pl/sql),no custom event is received by forms,even if the pjc certainly sends it...
    That happens only while performing the loop...
    Is there any special reason why this is happening?is the listener for custom_events disabled during loops execution?
    I've found a workaround for this...I've created another endoffile property wich I'm reading after each line import...but this takes a lot of extra time,doesn't it?
    Thanks for your time

  • Post query trigger problem in master detail oracle forms

    Hello experts,
                        I am new in oracle forms n using Fission middleware 10g with oracle forms 11g at windows 7 platform.
    I have made a master detail form using a tab canvas.There is a database column STUDENTID and it is in my student tab with a TBL_STUDENTENTRY data block.Now I Have an another tab named previous_education with TBL_STUDENT_PREVIOU_EDU datablock here there is also a database column STUDENTID and corresponding field in my  previous_education TAB under TBL_STUDENT_PREVIOU_EDU  datablock.Now i want to add a display item to show  student name corresponding to STUDENTID.For this I have tried to make a select query in TBL_STUDENT_PREVIOU_EDU data block POPST_QUERY TRIGGER.
    begin
    select STUDENTNAME into :TBL_STUDENT_PREVIOU_EDU.STD_NM   from TBL_STUDENTENTRY where STUDENTID=:TBL_STUDENTENTRY.STUDENTID;
    end;
    But, This trigger is not fired at runtime,Please suggest me what is going wrong and give me the solution.
    Thank You
    AADITYA.

    http://www.club-oracle.com/forums/post_query-problem-in-oracle-forms-t9751/#post23794 ,  This is the link at where  I have tried to show my problem with the help of an image,Please get the link:
    thanx
    regards Aaditya.

  • Doubt with Windows and Oracle Forms 10G and 11g

    Hi
    I have some doubts in installing Oracle Client on Windows.
    a)Can we install Oracle Forms 10g and Reports 10g client on Windows 7?
    b)Can we install Oracle Forms 11g and Reports 11g client on Windows XP?
    c)If we have an Oracle Forms 11g and Reports 11g, can it connect to a 10g Server?
    d)If we have an Oracle Forms 10g and Reports 10g Client, can it connect to an 11g Server?
    Please, Can any one help me in this????

    a)yes it can be installed on win7, may have some issues on 64bit systems but they're solvable
    b)11g had some problems with windows 2000, but didn't see mention of any problems on XP
    c)if you mean a database server then yes - i managed to connect 11g to an 8i database, so v10 should not be a problem. If you mean a forms/reports server..well newer forms/reports builder might not want to run old forms/reports and vice versa, but I don't see the point of operating on the same files from different versions. You can still load old form/report source files with a newer builder and recompile them to run on the new server.
    d) the "client" is effectively your web browser with a java plugin, unless I misunderstood your question. What version was a form/report compiled with should not be an issue.

  • Passing text parameter with spaces to oracle forms function

    Hi,
    I have a personalized link in R12.1.3 from OAF to a custom form, which is working fine:
    Item Style = Link
    Destination URI = form:PO:XXPO:STANDARD:XXXABC03:VENDOR_ID={@VendorID} QUERY_MODE=No
    View Instance = SupplierVO
    XXPO is the responsibility key, and PO the responsibility application
    XXXABC03 is the function name
    VENDOR_ID and QUERY_MODE are the form parameters
    This link works as expected.
    I have a problem passing a text parameter containing spaces. The Oracle Application Framework Developer's Guide
    Release 12.1.3 states the following
    Note: If you wish to send varchar2 parameter values that contain spaces, use \" to enclose the string value. For example, to pass in something of the form:
    TXN_NUMBER=LT INVOICE 1
    Use:
    TXN_NUMBER=\"LT INVOICE 1\"
    So my personalization becomes
    Item Style = Link
    Destination URI = form:PO:XXPO:STANDARD:XXXABC03:VENDOR_ID={@VendorID} VENDOR_NAME=\"{@VendorName}\" QUERY_MODE=No
    View Instance = SupplierVO
    But the problem is that the spaces in the vendor name parameter are replaced with %20 when the form opens, e.g. EXAMPLE%20SUPPLIER%20LTD instead of EXAMPLE SUPPLIER LTD
    Has anybody got this type of personalization working? Thanks in advance, Ruth
    Additional Note:
    In real life I have created a workaround for this example. I just pass vendor_id and have modified the XXXABC03 form to derive vendor_name from vendor_id. But I now have another requirement where the parameter WILL have spaces.
    In desperation I may add a function to the form to replace %20 with a space in text parameters.
    But it would be nice if Oracle worked how it is explained in the manual......

    Hi,
    I'm not sure if there is a built in function. Else, Javascript code would be necessary.
    Using the technique in the link below will do.
    http://www.java2s.com/Code/JavaScript/Form-Control/Jumptothenextfield.htm
    Unfortunately, it doesn't seem like that tabIndex attribute is supported in ADF Faces. Link below.
    ADF Faces setting the tab order between fields
    They are suggestions to use the <h:inputText> component instead but not sure if that is supported and if other problem may occur.
    Regards,
    Chan Kelwin

  • Problems with deploy in Oracle AS 10g

    Hi people,
    We developed a system that we need to install on my client’s Oracle Application Server 10g, but I haven't the OAS here in my company and I can't test it on my client. In my application, I access the data source by two ways: one way by the Hibernate, editing the application’s "hibernate.cfg.xml" file and the other way access by JDBC directly.
    In hibernate.cfg.xml, I edit the property of "hibernate.connection.datasource" by this way (my application name's is "GCS"):
    <property name="hibernate.connection.datasource">java/gcs</property>
    By JDBC, I get the connection by this way:
    protected Connection getConnection() throws DAOException {
    Context initContext;
    try {
    initContext = new InitialContext();
    DataSource ds = (DataSource)initContext.lookup
    ("java/gcs");
    return ds.getConnection();
    } catch (Throwable e) {
    throw new DAOException(e);
    In Oracle AS, I created a data source with the name and the JNDI location "java/gcs" and in the "Data Source Class" field I wrote "com.evermind.sql.DriverManagerDataSource".
    With this configuration the OAS did the deploy successfully. So I started the application and the system started to process the mapping of the Hibernate classes' (I could see this by the log).
    The problem is when I access the system deployed, appeared a window in my browser like those directory permission window that ask by username and password. This is very strange. Apparently, I have no access to the directory of my application... I try to put the username and password of the Windows, of the database user, of the OAS administrator... but nothing happens.
    Somebody knows what is this window? Why it appears? Where I configure this in the OAS?
    Thank's
    Rodison Ferreira
    [email protected]
    skype: rodison
    msn: [email protected]

    Hi,
    Here's the Oracle Forms 10g Deployment Guide
    http://download-east.oracle.com/docs/cd/B14099_11/web.1012/b14032/toc.htm
    HTH,
    Jim

  • Problem of Installation of Oracle Forms & Reports Release 6i in Win XP Pro

    I can install Oracle Forms and Reports Release 6i in a P4 WinXP machine by using different Oracle Home. But the Net8 Easy Config cannot be run. This can be solved by editing the file TNSNAMES.ORA manually to configurate the connection. After that, the forms is workable but when I print the report, the report background engine show the error for printing.
    I am still asking for whether any patch files or update can be downloaded to fix the installation problem of Oracle Forms and Report 6i in WinXP Pro.

    I don't have the 651, but the 865.  The 865 came with a Mega disc and required installing the Intel drivers from the disc.  Since the 865 is driven primarly by USB, windows would attempt to assign a driver to motherboard and devices, but would inevitably be wrong.  Only by installing the Intel drivers were things found properly.
    Is there any chance there are such drivers with the 651 as well?

  • Problem with freeze on Document forms

    Hi all,
    i've a problem with freeze on document's forms (like invoice) when i make changes on matrix.
    For example i've an addon that calculate discounts for items and update the information in the matrix. But when I update the info in the Matrix I see the cursor run across the matrix.
    This create two problems. The first one is the orrible aspect that the operation assume, the second is that sometimes some cells turn to black and remain ofthis color.
    Can someone help me?
    Here I post a piece of my code:
        Dim oForm As SAPbouiCOM.Form = SBOApplication.Forms.Item(FormUID)
        Dim oMatrix As SAPbouiCOM.Matrix = oForm.Items.Item("38").Specific
        Dim oRefLine As Integer = 0
        oForm.Freeze(True)
        Dim Cnt As Integer = 1
        Try
          While Cnt <= oMatrix.RowCount
            If oMatrix.Columns.Item("U_RefLineId").Cells.Item(Cnt).Specific.Value <> "" Then
              Dim apDouble As Double = oMatrix.Columns.Item("15").Cells.Item(Cnt).Specific.Value.ToString.Replace(".", ",")
              If apDouble <> 100 Then
                SetMatrixValue(oMatrix, "U_RefLineId", Cnt, "")
                SetMatrixValue(oMatrix, "11", Cnt, oMatrix.Columns.Item("U_OrigQtyMN").Cells.Item(Cnt).Specific.Value)
                SetMatrixValue(oMatrix, "U_OrigQtyMN", Cnt, 0)
                Cnt = Cnt + 1
              Else
                oMatrix.Columns.Item("15").Cells.Item(Cnt).Click()
                SBOApplication.ActivateMenuItem("1293")
              End If
            Else
              SetMatrixValue(oMatrix, "15", Cnt, 0)
              Cnt = Cnt + 1
            End If
          End While
        Catch ex As Exception
          SBOApplication.StatusBar.SetText("Error: " & ex.Message, SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error)
        End Try
        oForm.Freeze(False)

    Hi Daniele,
    I use a little different approach because the Freeze on a Form is like parenthesis on formula. You must be sure that the Freeze(true) are balanced by a Freeze(false).
    So my pattern is:
    Try
        oForm.Freeze(True)
        ' the operation you need to do with the freezed form
    Catch Ex as Exception
        ' Menage the errors here
    Finally
        oForm.Freeze(False)
    End Try
    The Finally statement is executed in both case when an Exception is raised or when the code is right executed.
    But I think this is not the problem in your code.
    If you still having problem, probably we need to examine your sub-routine "SetMatrixValue".
    It is also important to know your SAP Business One version because in the past there was a version with a problem in the refresh of matrix.
    I use SAP Business One 2007A SP01 PL06 HF1 and I do not have problem with the freezing.
    Hope it helps.
    Carmine

  • Problem with RollBack in  Oracle Batching

    Hi all,
    This is Adhil. I am facing a problem with Oracle Batching in java.
    I am using java 1.5 and Oracle 10 g.
    I have a below standalone code to test the Oracle Batching (Assume that i have the 2 tables with zero records ).
    with the batch size set as 10, I am trying add 2 records in each table.
    Now I rise divideByZero error exception manually and trying to rollback the connection in catch statement . But couldn't rollback the connection. I see the 2 records added in both of my tables.
    The same code when i set the batchsize 2 and trying to insert 10 records ,I could rollback and no rows get inserted.
    Since I am going to get the no of insert from user in runtime , my rollback may fail in any combinations as in my first case(with batch size 10 and if the no of insert is 2).
    import java.io.*;
    import java.util.*;
    import java.sql.*;
    import oracle.jdbc.*;
    public class BatchTest{
         public static void main(String args[]) throws Exception{
              Connection conn = null;
              conn = new BatchTest().createConnection();
              new BatchTest().insertdata(conn);
         public Connection createConnection() throws Exception{
                   Properties props =new Properties();
                   props.load(ClassLoader.getSystemResourceAsStream("connection.properties"));
                   String connectionString = (String)props.get("connection");
                   String username = (String)props.get("username");
                   String password = (String)props.get("password");
                   Class.forName("oracle.jdbc.driver.OracleDriver");
                   Connection connection = DriverManager.getConnection(connectionString, username, password);
                   return connection;
         public void insertdata(Connection dbConnection){
              PreparedStatement psCnt =null;
              PreparedStatement psImp =null;
              try{
              dbConnection.setAutoCommit(false);
              psCnt = dbConnection.prepareStatement("insert into CHKCNT values (?,?)");
              psImp = dbConnection.prepareStatement("insert into CHKIMP values (?,?)");
              ((OraclePreparedStatement)psCnt).setExecuteBatch (10);
              ((OraclePreparedStatement)psImp).setExecuteBatch (10);
              int x=0;
              for(int i=1;i<=2;i++){
                        psCnt.setInt(1,i);
                        psCnt.setString(2,"Jack");
                        psImp.setInt(1,i);
                        psImp.setString(2,"John");
                        psImp.executeUpdate();
                        psCnt.executeUpdate();
              if(true) x=10/0;
              dbConnection.commit();
              }catch(Exception e){
                   try{
                   dbConnection.rollback();
                   dbConnection.close();
                   }catch(Exception ex){
                   e.printStackTrace();
              }finally{
                   try{
                        psCnt.close();
                   }catch(Exception ee){
                   ee.printStackTrace();
    Can anyone suggest me a way to make my rollback work.
    Thanks in advance.
    -adhil.J

    Hi all,
    This is Adhil. I am facing a problem with Oracle Batching in java.
    I am using java 1.5 and Oracle 10 g.
    I have a below standalone code to test the Oracle Batching (Assume that i have the 2 tables with zero records ).
    with the batch size set as 10, I am trying add 2 records in each table.
    Now I rise divideByZero error exception manually and trying to rollback the connection in catch statement . But couldn't rollback the connection. I see the 2 records added in both of my tables.
    The same code when i set the batchsize 2 and trying to insert 10 records ,I could rollback and no rows get inserted.
    Since I am going to get the no of insert from user in runtime , my rollback may fail in any combinations as in my first case(with batch size 10 and if the no of insert is 2).
    import java.io.*;
    import java.util.*;
    import java.sql.*;
    import oracle.jdbc.*;
    public class BatchTest{
         public static void main(String args[]) throws Exception{
              Connection conn = null;
              conn = new BatchTest().createConnection();
              new BatchTest().insertdata(conn);
         public Connection createConnection() throws Exception{
                   Properties props =new Properties();
                   props.load(ClassLoader.getSystemResourceAsStream("connection.properties"));
                   String connectionString = (String)props.get("connection");
                   String username = (String)props.get("username");
                   String password = (String)props.get("password");
                   Class.forName("oracle.jdbc.driver.OracleDriver");
                   Connection connection = DriverManager.getConnection(connectionString, username, password);
                   return connection;
         public void insertdata(Connection dbConnection){
              PreparedStatement psCnt =null;
              PreparedStatement psImp =null;
              try{
              dbConnection.setAutoCommit(false);
              psCnt = dbConnection.prepareStatement("insert into CHKCNT values (?,?)");
              psImp = dbConnection.prepareStatement("insert into CHKIMP values (?,?)");
              ((OraclePreparedStatement)psCnt).setExecuteBatch (10);
              ((OraclePreparedStatement)psImp).setExecuteBatch (10);
              int x=0;
              for(int i=1;i<=2;i++){
                        psCnt.setInt(1,i);
                        psCnt.setString(2,"Jack");
                        psImp.setInt(1,i);
                        psImp.setString(2,"John");
                        psImp.executeUpdate();
                        psCnt.executeUpdate();
              if(true) x=10/0;
              dbConnection.commit();
              }catch(Exception e){
                   try{
                   dbConnection.rollback();
                   dbConnection.close();
                   }catch(Exception ex){
                   e.printStackTrace();
              }finally{
                   try{
                        psCnt.close();
                   }catch(Exception ee){
                   ee.printStackTrace();
    Can anyone suggest me a way to make my rollback work.
    Thanks in advance.
    -adhil.J

  • Problem with query for Oracle

    Hello Experts,
    I'm tryng to develop my first application for EP (v7 SP12) with NWDS (without NWDI).
    This application has to read and write data in the EP DB (oracle v10).
    I'm using:
    <u>a Dictionary Project</u> (define the DB Tables)
    <u>a Java Project</u> (define class as DAO, DBManager etc)
    <u>a Library Project</u>
    <u>an EJB Project</u>
    <u>an EAR Project</u>
    With these projects I can deploy a <u>webService</u> in my EP server.
    BUT I have some problem with a query that I'm tryng to sent to my DB through a DAO Class called by my WebService.
    The query is simple and correct but it does not work...
    This is the error message returned (the query id in bold)
    (column names: GIORNO, NOMEDITTA, NOMEAREA, NOMESETTORE)
    <i>HTTP/1.1 500 Internal Server Error
    Connection: close
    Server: SAP J2EE Engine/7.00
    Content-Type: text/xml; charset=UTF-8
    Date: Fri, 21 Sep 2007 14:29:57 GMT
    Set-Cookie: <value is hidden>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Client</faultcode><faultstring>java.sql.SQLException: com.sap.sql.log.OpenSQLException: The SQL statement <b>"SELECT NOMESETTORE, MIN(? - "GIORNO") AS GIORNI FROM SRS_DATEINFORTUNI WHERE NOMEDITTA = ? AND NOMEAREA= ? GROUP BY NOMESETTORE ORDER BY NOMESETTORE"</b> <u>contains the syntax error[s]: - 1:25 - the arithmetic expression >>? - "GIORNO"<< contains a host variable (parameter marker)</u></faultstring><detail><ns1:getGiorniSettori_com.akhela.giorniSenzaInfortuni.ejb.exception.GiorniSenzaInfortuniException xmlns:ns1='urn:GiorniSenzaInfortuniWSWsd/GiorniSenzaInfortuniWSVi'></ns1:getGiorniSettori_com.akhela.giorniSenzaInfortuni.ejb.exception.GiorniSenzaInfortuniException></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope></i>
    The variable '?' is the today date, the difference <b>"(?-GIORNO)"</b> is an int..
    Moreover in my DAO class the query is <b>"SELECT NOMESETTORE, MIN(? - GIORNO) AS GIORNI FROM SRS_DATEINFORTUNI WHERE NOMEDITTA = ? AND NOMEAREA= ? GROUP BY NOMESETTORE ORDER BY NOMESETTORE</b>", instead in the error message is reported <b>MIN(? - "GIORNO")</b>...
    We have tryed also with alternative query, for example we used <b>"MIN(SYSDATA - GIORNO)"</b> but <b>SYSDATA</b> was interpreted as column name and  not found....
    Any help???
    Best Regards

    Hi, I found something about the Host Variable (http://help.sap.com/saphelp_nw70/helpdata/en/ed/dbf8b7823b084f80a6eb7ad43bdbb9/content.htm), there explain that if you want to use an host variable you have to put ':' as prefix..
    My problem is that <u>I need to extract the minimum of the subtraction between two dates:</u>
    Query <b>MIN(? - GIORNO)</b> --> <i>Error: the arithmetic expression >>? - "GIORNO"<< contains a host variable (parameter marker)</i>
    So I tried to use the ':' as indicated in the manual..
    <b>MIN:(? - GIORNO)</b> --> - <i>SQL syntax error: the token ":" was not expected here
                   - expecting LPAREN, found ':'</i>
    <b>MIN(:(? - GIORNO))</b> --> <i>- 1:25 - Open SQL syntax error: :PARAMETER not allowed
                   - 1:26 - SQL syntax error: the token "(" was not expected here
                   - 1:26 - expecting ID, found '('</i>
    Then I tried to avoid the MIN() function and I tried to do just the subtraction:
    <b>? - GIORNO</b> --><i> - 1:21 - the arithmetic expression >>? - "GIORNO"<< contains a host variable (parameter marker)</i>
    <b>:(? - GIORNO)</b> --> <i>- 1:21 - Open SQL syntax error: :PARAMETER not allowed
                - 1:22 - SQL syntax error: the token "(" was not expected here
                - 1:22 - expecting ID, found '('</i>
    <b>'2007-09-24' - GIORNO</b> --> <i>- 1:34 - SQL syntax error: first argument of operator "-" must be a number, date/time or interval
                     - 1:43 - SQL syntax error: arguments of operator "-" do not have correct types
                     - 1:43 - SQL syntax error: derived columns in SELECT list with AS must be values</i>
    <b>GIORNO - GIORNO</b> --> <i>- 1:21 - the group by list and the select list are inconsistent: the column >>"GIORNO"<< is neither grouped nor aggregated
                  - 1:30 - the group by list and the select list are inconsistent: the column >>"GIORNO"<< is neither grouped nor aggregated</i>
    Why these parts of query are not accepted???
    I don't understand why... I hope you can help me.
    Best Regards
    Alessandro

Maybe you are looking for

  • How to monitor/examine threads usage in WebLogic Server?

    Hi, I need to monitor andd examine the usage of the threads (execute, non-blocking execute, etc.) in my WebLogic Server (WLS) instance (5.1 SP10 on Solaris 2.6) so that I can check that multi-threading is being used by WLS when executing methods on s

  • HT2513 iCal string of events repeat and end on a given date?

    Is there a way to have any given string of events repeat and end on a given date? Example, I have a different training regiment for each day leading up to an event/date and then will have the same training regiment again leading up to another event.

  • TS3899 how do I get deleted emails to stop reapprearing as new emails

    Everytime I delete my email they pop back up as unread.  Even If I login to AOL and delete from mail there they still pop up.

  • Premiere Elements not working

    When starting, it reports Organiser Database missing or corrupt. When trying to create a new database, Adobe crashes and ends. Any suggestions?

  • Material release

    Hi all, some cost estimates are marked and are in status 'Vo'. These materials when released for current period thr CK24 shows error 'Period closing has not taken place yet' . But when released for previous period gived error ' Release to Late' .? Ho