Not Updating the Values in the JComboBox and JTable

Hi Friends
In my program i hava Two JComboBox and One JTable. I Update the ComboBox with different field on A Table. and then Display a list of record in the JTable.
It is Displaying the Values in the Begining But when i try to Select the Next Item in the ComboBox it is not Updating the Records Eeither to JComboBox or JTable.
MY CODE is this
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.DefaultComboBoxModel.*;
import javax.swing.table.*;
import java.sql.*;
import java.util.*;
public class SearchBook extends JDialog implements ActionListener
     private JComboBox comboCategory,comboAuthor;
     private JSplitPane splitpane;
     private JTable table;
     private JToolBar toolBar;
     private JButton btnclose, btncancel;
     private JPanel panel1,panel2,panel3,panel4;
     private JLabel lblCategory,lblAuthor;
     private Container c;
     //DefaultTableModel model;
     Statement st;
     ResultSet rs;
     Vector v = new Vector();
     public SearchBook (Connection con)
          // Property for JDialog
          setTitle("Search Books");
          setLocation(40,110);
          setModal(true);
          setSize(750,450);
          // Creating ToolBar Button
          btnclose = new JButton(new ImageIcon("Images/export.gif"));
          btnclose.addActionListener(this);
          // Creating Tool Bar
          toolBar = new JToolBar();
          toolBar.add(btnclose);
          try
               st=con.createStatement();
               rs =st.executeQuery("SELECT BCat from Books Group By Books.BCat");
               while(rs.next())
                    v.add(rs.getString(1));
          catch(SQLException ex)
               System.out.println("Error");
          panel1= new JPanel();
          panel1.setLayout(new GridBagLayout());
          GridBagConstraints c = new GridBagConstraints();
          c.fill = GridBagConstraints.HORIZONTAL;
          lblCategory = new JLabel("Category:");
          lblCategory.setHorizontalAlignment (JTextField.CENTER);
          c.gridx=2;
          c.gridy=2;
          panel1.add(lblCategory,c);
          comboCategory = new JComboBox(v);
          comboCategory.addActionListener(this);
          c.ipadx=20;
          c.gridx=3;
          c.gridwidth=1;
          c.gridy=2;
          panel1.add(comboCategory,c);
          lblAuthor = new JLabel("Author/Publisher:");
          c.gridwidth=2;
          c.gridx=1;
          c.gridy=4;
          panel1.add(lblAuthor,c);
          lblAuthor.setHorizontalAlignment (JTextField.LEFT);
          comboAuthor = new JComboBox();
          comboAuthor.addActionListener(this);
          c.insets= new Insets(20,0,0,0);
          c.ipadx=20;
          c.gridx=3;
          c.gridy=4;
          panel1.add(comboAuthor,c);
          comboAuthor.setBounds (125, 165, 175, 25);
          table = new JTable();
          JScrollPane scrollpane = new JScrollPane(table);
          //panel2 = new JPanel();
          //panel2.add(scrollpane);
          splitpane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,panel1,scrollpane);
          splitpane.setDividerSize(15);
          splitpane.setDividerLocation(190);
          getContentPane().add(toolBar,BorderLayout.NORTH);
          getContentPane().add(splitpane);
     public void actionPerformed(ActionEvent ae)
          Object obj= ae.getSource();
          if(obj==comboCategory)
               String selecteditem = (String)comboCategory.getSelectedItem();
               displayAuthor(selecteditem);
               System.out.println("Selected Item"+selecteditem);
          else if(obj==btnclose)
               setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
          else if(obj==comboAuthor)
               String selecteditem1 = (String)comboAuthor.getSelectedItem();
               displayavailablity(selecteditem1);
               //System.out.println("Selected Item"+selecteditem1);
               System.out.println("Selected Author"+selecteditem1);
     private void displayAuthor(String selecteditem)
          try
          {     Vector data = new Vector();
               rs= st.executeQuery("SELECT BAuthorandPublisher FROM Books where BCat='" + selecteditem + "' Group By Books.BAuthorandPublisher");
               System.out.println("Executing");
               while(rs.next())
                    data.add(rs.getString(1));
               //((DefaultComboBoxModel)comboAuthor.getModel()).setVectorData(data);
               comboAuthor.setModel(new DefaultComboBoxModel(data));
          catch(SQLException ex)
               System.out.println("ERROR");
     private void displayavailablity(String selecteditem1)
               try
                    Vector columnNames = new Vector();
                    Vector data1 = new Vector();
                    rs= st.executeQuery("SELECT * FROM Books where BAuthorandPublisher='" + selecteditem1 +"'");     
                    ResultSetMetaData md= rs.getMetaData();
                    int columns =md.getColumnCount();
                    String booktblheading[]={"Book ID","Book NAME","BOOK AUTHOR/PUBLISHER","REFRENCE","CATEGORY"};
                    for(int i=1; i<= booktblheading.length;i++)
                         columnNames.addElement(booktblheading[i-1]);
                    while(rs.next())
                         Vector row = new Vector(columns);
                         for(int i=1;i<=columns;i++)
                              row.addElement(rs.getObject(i));
                         data1.addElement(row);
                         //System.out.println("data is:"+data);
                    ((DefaultTableModel)table.getModel()).setDataVector(data1,columnNames);
                    //DefaultTableModel model = new DefaultTableModel(data1,columnNames);
                    //table.setModel(model);
                    rs.close();
                    st.close();
               catch(SQLException ex)
}Please check my code and give me some Better Solution
Thank you

You already have a posting on this topic:
http://forum.java.sun.com/thread.jspa?threadID=5143235

Similar Messages

  • GR's are not updating "Actual" Value under the limit tab in PO

    Hi Friends
    Can anyone tell me the possible solution for GR's value are not updating in the "Actual" Value under the limit tab in the service PO.
    Thanks in Advance

    Hi,
    I hope this is a service PO with item category D and the GR you mean is the service entry sheet.
    Do you have an entry in the Purchase order history for the PO for this?
    Do you have an acceptance for the service entry sheet which is complete?
    Best regards,
    Sridhar

  • Using KeyMap in Editable JComboBoxes and JTable

    I am using Keymapping for JTextFields. It works fine ! I am interested in extending the keymap feature to JComboBoxes and JTable.

    if you want to do the keymapping inside the editable component of the combobox or the table, make sure you apply it on the editor component.e.g. comboBox.getEditor().getEditorComponent() and table.getCellEditor().getTableCellEditorComponent().

  • After download itunes installation began in windowx xp near the end of the installation the message says: it was not possible to write the value to the key Software / Classes / .mpg / OpenWithList / iTunes / .exe. Already reinstalled 3 times and always sa

    After download itunes installation began in windowx xp near the end of the installation the message says: it was not possible to write the value to the key Software / Classes / .mpg / OpenWithList / iTunes / .exe.
    Already reinstalled 3 times and always says the same message.
    thank you

    Only two had virus on windows XP this week and wiped them with Avast. The itunes asked me to install the update, and so I did. but it always gives me that message.

  • Can't add music my iPhone from iTunes.  When I try to drag a song over to my phone, I get the circle w/ the syncing line through it, but it does not update/load.  [Manually manage music and videos] is checked. And, this is the only Mac I have ever used to

    Can't add music my iPhone from iTunes.
    When I try to drag a song over to my phone, I get the circle w/ the syncing line through it, but it does not update/load.
    [Manually manage music and videos] is checked. And, this is the only Mac I have ever used to add music to my phone.
    Also, just updated the phone's software today, and iTunes' software is already up to date.

    Hi Gregg,
    Have you tried resetting the device (nothing will be lost): Hold down the Home and Power buttons at the same time and continue to hold them down until the Apple appears (up to 30 seconds). Once the Home screen redisplays, see if your Music app is behaving normally.
    Cheers,
    GB

  • Hi - my Mu was "buggy" and would not update - so i threw the APP in the trash - but now CC will not allow me to Re-Install because it thinks i already have the APP - any advice?

    hi - my Mu was "buggy" and would not update - so i threw the APP in the trash - but now CC will not allow me to Re-Install because it thinks i already have the APP - any advice?

    restore your app from the trash and then properly uninstall.
    if that fails, CC desktop lists applications as "Up to Date" when not installed

  • I have iCloud on my iMac, macbook and iPhone.  However, when I update my contacts on one, it does not update on any of the other devices.  The calendar seems to be working.  Any suggestions?

    I have iCloud on my iMac, macbook and iPhone.  However, when I update my contacts on one, it does not update on any of the other devices.  The calendar seems to be working.  Any suggestions?

    On the iMac and MacBook open System Preferences > iCloud
    Deselect the box next to Contacts, then reselect it then restart the Macs.
    On the iPhone tap Settings > iCloud
    Switch Contacts off then back on then restart the iPhone.
    Hold the On/Off Sleep/Wake button down until the red slider appears. Slide your finger across the slider to turn off iPhone. To turn iPhone back on, press and hold the On/Off Sleep/Wake button until the Apple logo appears.

  • HT5621 i could not update my applications since the account that applied was when i was in the US...it says that i needed to change itunes store here in the philippines and how do i do that?

    i could not update my applications since the account that applied was when i was in the US...it says that i needed to change itunes store here in the philippines and how do i do that?

    Click here and follow the instructions to change the iTunes Store country.
    (87167)

  • I cleared the cache and my site does not update!  What's the secret?

    I cleared the cache and my site does not update! What's the secret? I created a second website and bought a domain name. You can get to the site by it's mac name or the purchased domain name. I linked the domain name and with my server and it works. The site comes up wither way. BUT, either way, I cannot get my changes to appear. I had realized that my links were not working because I had placed them within the header. So, I moved the links out of the header, republished, and now the new pages (with links in body of website) will not load. Here are the two ways to get to see the site. Both show the old way (links in header). What is up with me not being able to see the changes in either Firefox or Safari?
    http://www.frankysoldiesbutgoodies.com/
    http://web.mac.com/musbegin/iWeb/OldiesButGoodies/OldiesButGoodies.html
    Thanks,
    musicalbeginnings

    hello mccormick.lee, please try downloading the full setup file for the current firefox version from https://www.mozilla.org/firefox/all/ and install it on top of your current installation.

  • The value in flexfield context reference web bean does not match with the value in the context of the Descriptive flexfield web bean BranchDescFlex. If this in not intended, please go back to correct the data or contact your Systems Administrator for assi

    Hi ,
    We have enabled context sensitive DFF in Bank Branch Page for HZ_PARTIES DFF , We have created Flex Map so that only bank branch context fields are only displayed in the bank branch page and  as we know party information DFF is shared by supplier and Customer Page so we dint want to see any Bank Branch fields or context information in those pages.
    We have achieved the requirement but when open existing branches bank branch update is throwing below error message :
    "The value in flexfield context reference web bean does not match with the value in the context of the Descriptive flexfield web bean BranchDescFlex. If this in not intended, please go back to correct the data or contact your Systems Administrator for assistance."
    this error is thrown only when we open existing branches, if we save existing branch and open then it is not throwing any error message.
    Please let us know reason behind this error message.
    Thanks,
    Mruduala

    You are kidding?  It took me about 3 minutes to scroll down on my tab to get to the triplex button!
    Habe you read the error message? 
    Quote:
    java.sql.SQLSyntaxErrorException: ORA-04098: trigger 'PMS.PROJECT_SEQ' is invalid and failed re-validation
    Check the trigger and it should work again.
    Timo

  • The "SignFile" task was not given a value for the required parameter "CertificateThumbprint"

    We have a line of business app which is deployed via clickonce. I can build and publish the application without any problems but when I try to use Continuous Integration (Build each check-in) I get the following error:
    2>C:\Program Files (x86)\MSBuild\12.0\bin\amd64\Microsoft.Common.CurrentVersion.targets(3450,5):
    error MSB4044:
    The "SignFile" task was not given a value for the required parameter "CertificateThumbprint".
    [C:\Builds\1\Pulse\DefaultBuild\src\Pulse\Pulse\Pulse.csproj]
    Done executing task "SignFile" -- FAILED.
    We sign the application (to be more specific: the ClickOnce manifest) using a code signing certificate which is registered in the AD as Trusted Publisher.
    The Certificate is stored in Certificate store on my local workstation. The Certificate is also in the certificate store of the build server (1. In the Personal Store, 2. in the Personal store of the TFSBuildServiceHost Service Account and 3. in the Personal
    store of the tfs/build server itself).
    Where are using Visual Studio 2013 Update 4, C#, .Net 4.5 and TFS 2013 Update 4.
    I have no clue what causes this error, any help is appreciated.

    I installed the
    Windows Software Development Kit (SDK) for Windows 8 and now I can build the solution via command line.
    "C:\Program Files (x86)\MSBuild\12.0\bin\amd64\MSBuild.exe" C:\Builds\1\Pulse\DefaultBuild\src\Pulse\Pulse.sln
    "C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" C:\Builds\1\Pulse\DefaultBuild\src\Pulse\Pulse.sln
    But the TFS Build still fails.
    Here is the error output gathered from the tfsbuild logfile:
    Task "AL"
    C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\x64\AL.exe /culture:de /out:obj\Debug\de\Pulse.resources.dll /platform:AnyCPU /template:obj\Debug\Pulse.exe /embed:obj\Debug\Pulse.View.Localization.CreditsView.de.resources /embed:obj\Debug\Pulse.View.Localization.PulseMainWindow.de.resources
    Microsoft (R) Assembly Linker version 12.0.20806.33440
    Copyright (C) Microsoft Corporation. All rights reserved.
    Done executing task "AL".
    2>Done building target "GenerateSatelliteAssemblies" in project "Pulse.csproj".
    2>Target "CreateSatelliteAssemblies" in file "C:\Program Files (x86)\MSBuild\12.0\bin\amd64\Microsoft.Common.CurrentVersion.targets" from project "C:\Builds\1\Pulse\DefaultBuild\src\Pulse\Pulse\Pulse.csproj" (target "CoreBuild" depends on it):
    2>Done building target "CreateSatelliteAssemblies" in project "Pulse.csproj".
    Target "SetWin32ManifestProperties" skipped. Previously built successfully.
    Target "_DeploymentComputeNativeManifestInfo" skipped, due to false condition; ('$(GenerateClickOnceManifests)'!='true') was evaluated as ('true'!='true').
    2>Target "CleanPublishFolder" in file "C:\Program Files (x86)\MSBuild\12.0\bin\amd64\Microsoft.Common.CurrentVersion.targets" from project "C:\Builds\1\Pulse\DefaultBuild\src\Pulse\Pulse\Pulse.csproj" (target "_DeploymentComputeClickOnceManifestInfo" depends on it):
    Task "RemoveDir" skipped, due to false condition; ('$(PublishDir)'=='$(OutputPath)app.publish\' and Exists('$(PublishDir)')) was evaluated as ('bin\Debug\app.publish\'=='bin\Debug\app.publish\' and Exists('bin\Debug\app.publish\')).
    2>Done building target "CleanPublishFolder" in project "Pulse.csproj".
    Target "_DeploymentGenerateTrustInfo" skipped, due to false condition; ('$(TargetZone)'!='') was evaluated as (''!='').
    2>Target "_DeploymentComputeClickOnceManifestInfo" in file "C:\Program Files (x86)\MSBuild\12.0\bin\amd64\Microsoft.Common.CurrentVersion.targets" from project "C:\Builds\1\Pulse\DefaultBuild\src\Pulse\Pulse\Pulse.csproj" (target "GenerateApplicationManifest" depends on it):
    Task "Copy"
    Creating directory "bin\Debug\app.publish".
    Copying file from "obj\Debug\Pulse.exe" to "bin\Debug\app.publish\Pulse.exe".
    Done executing task "Copy".
    Using "SignFile" task from assembly "Microsoft.Build.Tasks.v12.0, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
    Task "SignFile"
    2>C:\Program Files (x86)\MSBuild\12.0\bin\amd64\Microsoft.Common.CurrentVersion.targets(3450,5): error MSB4044: The "SignFile" task was not given a value for the required parameter "CertificateThumbprint". [C:\Builds\1\Pulse\DefaultBuild\src\Pulse\Pulse\Pulse.csproj]
    Done executing task "SignFile" -- FAILED.
    2>Done building target "_DeploymentComputeClickOnceManifestInfo" in project "Pulse.csproj" -- FAILED.
    2>Target "_CheckForCompileOutputs" in file "C:\Program Files (x86)\MSBuild\12.0\bin\amd64\Microsoft.Common.CurrentVersion.targets" from project "C:\Builds\1\Pulse\DefaultBuild\src\Pulse\Pulse\Pulse.csproj" (target "_CleanGetCurrentAndPriorFileWrites" depends on it):
    2>Done building target "_CheckForCompileOutputs" in project "Pulse.csproj".
    Target "_SGenCheckForOutputs" skipped, due to false condition; ('$(_SGenGenerateSerializationAssembliesConfig)' == 'On' or ('@(WebReferenceUrl)'!='' and '$(_SGenGenerateSerializationAssembliesConfig)' == 'Auto')) was evaluated as ('Off' == 'On' or (''!='' and 'Off' == 'Auto')).
    2>Target "_CleanGetCurrentAndPriorFileWrites" in file "C:\Program Files (x86)\MSBuild\12.0\bin\amd64\Microsoft.Common.CurrentVersion.targets" from project "C:\Builds\1\Pulse\DefaultBuild\src\Pulse\Pulse\Pulse.csproj" (target "_CleanRecordFileWrites" depends on it):
    Task "ReadLinesFromFile"
    Done executing task "ReadLinesFromFile".
    Task "ConvertToAbsolutePath"
    Done executing task "ConvertToAbsolutePath".
    Task "FindUnderPath"
    Comparison path is "C:\Builds\1\Pulse\DefaultBuild\src\Pulse\Pulse".
    Done executing task "FindUnderPath".
    Task "FindUnderPath"
    Comparison path is "C:\Builds\1\Pulse\DefaultBuild\bin\".
    Done executing task "FindUnderPath".
    Task "FindUnderPath"
    Comparison path is "obj\Debug\".
    Done executing task "FindUnderPath".
    Task "RemoveDuplicates"
    Done executing task "RemoveDuplicates".
    2>Done building target "_CleanGetCurrentAndPriorFileWrites" in project "Pulse.csproj".
    2>Target "_CleanRecordFileWrites" in file "C:\Program Files (x86)\MSBuild\12.0\bin\amd64\Microsoft.Common.CurrentVersion.targets" from project "C:\Builds\1\Pulse\DefaultBuild\src\Pulse\Pulse\Pulse.csproj" (target "CoreBuild" depends on it):
    Task "RemoveDuplicates"
    Done executing task "RemoveDuplicates".
    Task "MakeDir"
    Done executing task "MakeDir".
    Task "WriteLinesToFile"
    Done executing task "WriteLinesToFile".
    2>Done building target "_CleanRecordFileWrites" in project "Pulse.csproj".
    2>Done Building Project "C:\Builds\1\Pulse\DefaultBuild\src\Pulse\Pulse\Pulse.csproj" (default targets) -- FAILED.
    1>Done executing task "MSBuild" -- FAILED.
    1>Done building target "Build" in project "Pulse.sln" -- FAILED.
    1>Done Building Project "C:\Builds\1\Pulse\DefaultBuild\src\Pulse\Pulse.sln" (default targets) -- FAILED.
    Build FAILED.
    "C:\Builds\1\Pulse\DefaultBuild\src\Pulse\Pulse.sln" (default target) (1) ->
    "C:\Builds\1\Pulse\DefaultBuild\src\Pulse\Pulse\Pulse.csproj" (default target) (2) ->
    (_DeploymentComputeClickOnceManifestInfo target) ->
    C:\Program Files (x86)\MSBuild\12.0\bin\amd64\Microsoft.Common.CurrentVersion.targets(3450,5): error MSB4044: The "SignFile" task was not given a value for the required parameter "CertificateThumbprint". [C:\Builds\1\Pulse\DefaultBuild\src\Pulse\Pulse\Pulse.csproj]
    0 Warning(s)
    1 Error(s)

  • Not able to get the value in the next page

    Hi,
    I am newbee for JSF and this question may sound silly. I tried to search through this
    forum, google....but did not find a solution....I hope some one here could please help
    me :-(
    I have Page1 and Page2. Page1 has a h:inputText field and a submit button.
    On click of the "Submit" button in Page1, I have to pass this text value entered by
    the user to Page2. In Page2, I have <h:inputText readonly="true" /> field,
    which will display the value that the user entered in Page1. Also, Page2 has a "Submit"
    button. On click of Page2.Submit button, the value displayed in the Page2.textfield
    is not getting populated to the Page2 bean attribute.
    Here are the code that I am using
    1. Page1:
    <f:view>
    <h:form id="Page1">
         <h:inputText id="primaryKey" required="true" value="#{Page1.primaryKey}" />
         <h:commandButton id="command" value="Submit" action="Page1"/>
    </h:form>
    </f:view>
    2. Page2:
    <f:view>
    <h:form id="Page2">
         // Yes, Value attribute points to Page1.primaryKey to display user entered value in this page.
         <h:inputText id="test" value="#{Page1.primaryKey}" readonly="true" />
         <h:commandButton id="command" value="Submit" action="#{Page2.save()}"/>
    </h:form>
    </f:view>
    3. faces-config.xml
    <navigation-rule>
    <from-view-id>/Page1.jsp</from-view-id>
    <navigation-case>
    <from-outcome>Page1</from-outcome>
    <to-view-id>/Page2.jsp</to-view-id>
    </navigation-case>
    </navigation-rule>
    <managed-bean>
    <managed-bean-name>Page1</managed-bean-name>
    <managed-bean-class>com.Page1Bean</managed-bean-class>
    <managed-bean-scope>request</managed-bean-scope>
    </managed-bean>
    <navigation-rule>
    <from-view-id>/Page2.jsp</from-view-id>
    <navigation-case>
    <from-outcome>success</from-outcome>
    <to-view-id>/success.jsp</to-view-id>
    </navigation-case>
    </navigation-rule>
    <managed-bean>
    <managed-bean-name>Page2</managed-bean-name>
    <managed-bean-class>com.Page2Bean</managed-bean-class>
    <managed-bean-scope>request</managed-bean-scope>
    </managed-bean>
    4. com.Page1Bean.java
    public class Page1Bean {
         private String primaryKey;
         //getter and setter method below
    5. com.Page2Bean.java
    public class Page2Bean {
         private String test;
         //getter and setter method below
         public String save() {
    Now let me explain my issue, I enter a value in Page1 -> click on submit -> I see this value in the text field of
    Page2. But when I click on submit button of Page2, test attribute is still null. Could you please suggest me what
    am I suppose to do inorder to get this value in Page2Bean when I click on save button?
    Hope to listen from one of you,
    Thank you,
    VinodRamu

    Go here
    http://jsffaq.com/
    Many of your questions will be answered

  • Not able to view the values on the report viewed using Query Report Viewer

    Hi all,
    There seems to be some unknown problem with the Report Template I have prepared and uploaded on PIA XML Publisher. When I run it with some ID set, it doesn't seem to show the values from the Data I give. For example if I have a field called ChartField in my report Template, It doesn't seem to get populated when I do SetID.
    Why is it so?

    Hi all,
      select bdmng from resb into corresponding fields of table it_stpo2
                for all entries in it_stpo
                 where matnr = it_stpo-idnrk
                 and xloek ne 'X'.
      loop at it_stpo2.
        move-corresponding it_stpo2 to it_stpo.
        append it_stpo.
      endloop.
    In the above code, m able to fetch the records in the table it_stpo2. but the data is not gettin populated in the final internal table it_stpo. Both the internal tables it_stpo & it_stpo2 are same.
    The data is gettin moved from it_stpo2 to it_stpo but only upto the header level. its not gettin appended in the table it_stpo even after using append stmt.
    Plz help me to resolve this issue. its urgent.
    Rgds,
    Purva

  • How to raise an error message when duplicate value is entered in a tabular field column? Basically not allow duplicate value at the form level.

    Hi all,
    I have created a form with one data block MATURED_FD_DTL which looks like below:
    ACCT_FD_NO
    CUST_CODE
    FD_AMT
    FD_INT_BAL
    TDS
    CHQ_NO
    ADD_FD_AMT
    P_SAP_CODE
    P_TYPE
    CREATE TABLE MATURED_FD_DTL
      ACCT_FD_NO    VARCHAR2(17 BYTE)               NOT NULL,
      CUST_CODE     NUMBER(9),
      FD_AMT        NUMBER(15),
      FD_INT_BAL    NUMBER(15),
      TDS           NUMBER(15),
      CHQ_NO        NUMBER(10),
      ADD_FD_AMT    NUMBER(15),
      P_SAP_CODE    NUMBER(10),
      P_TYPE        VARCHAR2(1 BYTE)
    For MATURED_FD_DT.ACCT_FD_NO, Trigger: KEY_NEXT_ITEM, I have written the following code:
    DECLARE
    V1 NUMBER;
    V2 NUMBER;
    BEGIN
    V1:=:MATURED_FD_DTL.ACCT_FD_NO;
    MESSAGE('V1:'||V1);
    MESSAGE(' ');
    END;
         GO_ITEM('MATURED_FD_DTL.CUST_CODE');
    This is just a dummy code.
    When ever i enter the value in the field of ACCT_FD_NO, it pops up a message saying "V1:Value of ACCT_FD_NO",
    So i want to store that value .
    Compare them & if it is egual, it should pop up a message saying duplicate value is entered and must not allow to enter, at form_level.
    So how can I compare the ACCT_FD_NO value between FIRST_RECORD and NEXT_RECORD ??
    Help Me .
    Thank You.
    Oracle Forms 6i.
    Oracle 9i.

    Thank You HamidHelal.
    Actually before posting the code, I went through the first link you have mentioned. I tried also, it is quite tedious procedure, however i dint get the proper result, may be i have done some mistake. Anyways , can you tell me how do i check in database table, if a value exists OR IF VALUE FOUND & then message and raise form trigger failure; something like below.
    IF :MATURED_FD_DTL.ACCT_FD_NO EXISTS
    THEN MESSAGE('YOU HAVE ENTERED AN EXISTING OR DUPLICATE VALUE');
              MESSAGE(' ');
    RAISE FORM_TRIGGER_FAILURE;
    END;
    OR
    IF :MATURED_FD_DTL.ACCT_FD_NO FOUND
    THEN MESSAGE('YOU HAVE ENTERED AN EXISTING OR DUPLICATE VALUE');
              MESSAGE(' ');
    RAISE FORM_TRIGGER_FAILURE;
    END;
    Is there any equivalent in the form in oracle forms 6i?? Please let me know how do i do this??

  • Filters 'OR' function not passing the values to the sql

    Hi,
    I am facing an issue with the 'OR' function on the filters that are used in the reports.
    The report needs to fetch all the records on the three tables as the user enters the value in the dashboard prompts.
    eg: [   update_dt_A1 is prompted
    and user_name_A1 is prompted ]
    or
    [    update_dt_B1 is prompted
    and user_name_B1 is prompted ]
    or
    [    update_dt_C1 is prompted
    and user_name_C1 is prompted ]
    The values entered in the dashboard prompt gets passed to the filter, but the vaules are not passed over to the SQL that runs on the database, hence the reports shows all values and does not reflect the values entered.
    When the 'OR' function is replaced with 'AND' the values get passed to the SQL.
    Can anyone help on what is the issue on the filters?
    Thanks

    Here is how my Filters are set up
    Vendor Name is Prompted
    AND
    Vendor Number is Prompted
    AND
    [   [Last_update_date_Vendor is prompted
    AND
    User_name_Vendor is prompted]
    OR
    [Last_update_date_Site is prompted
        AND
        User_name_Site is prompted]
    OR
    [Last_update_date_Bank is prompted
        AND
        User_name_Bank is prompted]
    The values from the dashboard prompts gets passed to the filter, but the sql that runs does not take the values in the where clause.

Maybe you are looking for