How to search records using netbeans

i'm using netbeans.....how to search records from database
pls help me

Not at all....i'm familar with java,i stucking in button coding,that is
how to match with database.
public String buttonGo_action() throws SQLException {
// TODO: Process the action. Return value is a navigation
// case name where null will return to the same page.
System.out.println("Action******");
String sname=(String) textsearch.getText();
sname = "%"+ sname+"%";
grc_risks_customer_info_tableDataProvider.setCursorRow(grc_risks_customer_info_tableDataProvider.findFirst("NAME",sname));
//.findFirst("GRC_RISKS_CUSTOMER_INFO_TABLE",sname));
getSessionBean1().getGrc_risks_customer_info_tableRowSet().setString(1,sname);
grc_risks_customer_info_tableDataProvider.refresh();
this coding is not working...that's y...

Similar Messages

  • How to search records in a standard table with * ?

    Hi everyone,
    Can anyone tell me how to search records in a standard table with * ?
    That is, in screen if user type * abc * for searching the records in which the field MC_STEXT contains 'abc'. What the code should be? How to complete the code below?
      SELECT SINGLE objid FROM p1000  INTO p1000-objid,
      WHERE MC_STEXT = ? .
    Thanks!

    Hi
    There are several way to do that, probably just as some guys wrote the easier way is to use LIKE in WHERE condition and the sign % instead of *:
    V_STRING = '%ABC%'.
    SELECT SINGLE objid FROM p1000 INTO p1000-objid,
    WHERE MC_STEXT LIKE V_STRING.
    U can also use a range (just like select-options):
    RANGES: R_MC FOR P1000-MC_STEXT.
    R_MC-LOW = 'ABC'.
    R_MC(3) = 'ICP'.
    APPEND R_MC.
    SELECT SINGLE objid FROM p1000 INTO p1000-objid,
    WHERE MC_STEXT IN R_MC.
    Max

  • How do you record using a phantom mic.

    How can I record vocals in the GarageBand using the MacBook Pro?
    Thanks.

    Hi there etson!
    I have just the video for you:
    GarageBand '11 - Record your voice
    http://support.apple.com/kb/VI200
    There are other videos in the Related Videos section that may help you enhance your GarageBand experience. We also have an article online that may help you link up your third-party microphone and record from that into GarageBand:
    GarageBand '11: Record sound from a microphone
    http://support.apple.com/kb/PH1893
    Thanks for coming to the Apple Support Communities!
    Regards,
    Braden

  • How to delimit records using FM HR_INFOTYPE_OPERATION  ( in background )

    Hi all,
    Has anyone used HR_INFOTYPE_OPERATION with OPERATION = 'LIS9' to delimit a record? I keep on getting 'A complex application error has occurred' error message. When I go into dialog mode = '2', the FM will go into the Overview Screen and I realized that the Delimit Date on the top right of the screen is not what I specify as the new record's ENDDA but the original record's ENDDA. Also I have to manually click on Delimit icon on the top left of the screen before it gets delimited.
    Question:
    How do I pass in the delimited date to HR_INFOTYPE_OPERATION? I put it in the RECORD-ENDDA field but it doesn't seem to work?
    Thanks

    rohan,
    why dont you use change mode (mod) and just change the default end date to the date you want the record delimited? that is also delimiting.
    is this requirement for batch job?

  • How to collect records using BPM

    Hi All,
    i have a req that i need to collect records in chunks and want collect using BPM want make their single file.
    i have 10 fields in one table for that i have made one datatype ,i want to collect 1lac recods 5 times in BPM and want make a single file and send it to one file.
    please suggest what are the steps are req in BPM to do this.

    Hi Gangadhar,
    Check this links
    http://help.sap.com/saphelp_nw04/helpdata/en/08/16163ff8519a06e10000000a114084/content.htm (for one interface)
    http://help.sap.com/saphelp_nw2004s/helpdata/en/0e/56373f7853494fe10000000a114084/content.htm (for multiple interfaces)
    http://help.sap.com/saphelp_nw2004s/helpdata/en/0e/56373f7853494fe10000000a114084/content.htm
    Regards
    Ramesh

  • How to combine records using function

    Hi, all
    I have an oracle 10g running on a RH linux e3 server.
    I have two tables like this:
    CREATE TABLE "IMMUNODATA"."DEMOGRAPHICS" (
    "SUBJECTID" INTEGER NOT NULL,
    "WORKID" INTEGER,
    "OMRFHISTORYNUMBER" INTEGER,
    "OTHERID" INTEGER,
    "BARCODE" INTEGER,
    "GENDER" VARCHAR2(1),
    "DOB" DATE,
    "RACEAI" INTEGER,
    "RACECAUCASIAN" INTEGER,
    "RACEAA" INTEGER,
    "RACEASIAN" INTEGER,
    "RACEPAC" INTEGER,
    "RACEHIS" INTEGER,
    "RACEOTHER" VARCHAR2(50),
    "SSN" VARCHAR2(11),
    PRIMARY KEY("SUBJECTID") VALIDATE
    CREATE TABLE "IMMUNODATA"."BIOPSY" (
    "ID" INTEGER NOT NULL,
    "THEDATE" DATE ,
    "SUBJECTID" INTEGER NOT NULL,
    "TISSUE" VARCHAR2(50),
    "DATEOFBIOPSY" DATE ,
    "FACILITYWHEREDONE" VARCHAR2(200),
    "RESULT" VARCHAR2(500),
    "BARCODE" INTEGER,
    PRIMARY KEY("ID") VALIDATE,
    FOREIGN KEY("SUBJECTID") REFERENCES "IMMUNODATA"."DEMOGRAPHICS" ("SUBJECTID") VALIDATE
    the result of one selection is like this:
    select subjectid, barcode, tissue, dateofbiopsy from demographics left join biopsy;
    subjectid barcode tissue, dateofbiopsy
    1 500001 lung 2003/1/1
    1 500001 kidney 2005/3/4
    I want to have a view of this
    subjectid barcode biopsy dateofbiopsy
    1 500001 lung,kidney 2003/1/1,2005/3/4
    I created a function like this:
    CREATE OR REPLACE FUNCTION TEST(p_subjectid IN immunodata.biopsy.subjectid%TYPE ) RETURN VARCHAR2 IS
    v_tissue VARCHAR2(100),v_dateofbiopsy DATE;
    BEGIN
    FOR c IN (SELECT tissue, dateofbiopsy FROM immunodata.biopsy WHERE subjectid = p_subjectid)
    LOOP
    IF v_tissue IS NULL and v_dateofbiopsy IS NULL THEN
    v_tissue := c.tissue;
    v_dateofbiopsy :=c.dateofbiopsy;
    ELSE
    v_tissue := v_tissue||','||c.tissue;
    v_dateofbiopsy :=v_dateodbiopsy||','||c.dateofbiopsy;
    END IF;
    END LOOP;
    RETURN v_tissue,v_dateofbiopsy;
    END;
    The error says:
    Warning: Function created with compilation errors.
    SQL> show errors
    Errors for FUNCTION TEST:
    LINE/COL ERROR
    2/23 PLS-00103: Encountered the symbol "," when expecting one of the
    following:
    := ; not null default character
    The symbol "; was inserted before "," to continue.
    14/16 PLS-00103: Encountered the symbol "," when expecting one of the
    following:
    . ( * @ % & = - + ; < / > at in is mod remainder not rem
    <an exponent (**)> <> or != or ~= >= <= <> and or like
    between || multiset member SUBMULTISET_
    The symbol ". was inserted before "," to continue.
    So could I combine multiple fields in one function?
    Thanks!
    Qian

    Also, in addition to Warren's response, the "RETURN" keyword should be followed by a single VARCHAR2 value (or a NULL):
    test@ORA10G>
    test@ORA10G> create or replace function my_function (s varchar2) return varchar2 is
      2    v_str1 varchar2(100);
      3    v_str2 varchar2(100);
      4  begin
      5    v_str1 := '*'||s||'*';
      6    v_str2 := '~'||s||'~';
      7    return v_str1,v_str2;
      8  end;
      9  /
    Warning: Function created with compilation errors.
    test@ORA10G>
    test@ORA10G> show err
    Errors for FUNCTION MY_FUNCTION:
    LINE/COL ERROR
    7/16     PLS-00103: Encountered the symbol "," when expecting one of the
             following:
             . ( * @ % & = - + ; < / > at in is mod remainder not rem
             <an exponent (**)> <> or != or ~= >= <= <> and or like LIKE2_
             LIKE4_ LIKEC_ between || multiset member SUBMULTISET_
             The symbol ". was inserted before "," to continue.
    test@ORA10G>
    test@ORA10G> -- the following, for example, works
    test@ORA10G> create or replace function my_function (s varchar2) return varchar2 is
      2    v_str1 varchar2(100);
      3    v_str2 varchar2(100);
      4  begin
      5    v_str1 := '*'||s||'*';
      6    v_str2 := '~'||s||'~';
      7    return v_str1||v_str2;
      8  end;
      9  /
    Function created.
    test@ORA10G>
    test@ORA10G> select my_function('xxx') from dual;
    MY_FUNCTION('XXX')
    *xxx*~xxx~
    test@ORA10G>Search this site for "pivot/pivoting/string aggregation" and you'll get a lot of examples of what you intend to do using direct sql.
    pratz
    Rephrased a bit to make the response politically correct... ;)
    Message was edited by:
    pratz

  • How to develop complib using NetBeans IDE?

    Anyone has done this? I don't know which project type I should use.
    Thanks.

    Hi,
    Please post the query at the netbeans site.
    Thanks
    Cheers
    Giri

  • How to search OID using C#

    hi All,
    We developed an application which displays users and groups in an active directory. We are using System.DirectoryServices namespace to search Active directory. Our client is using OID as user database. we want to access OID from our C# code. Can any one please provide any sample code for the same?
    Is it possible to use same System.DirectoryServices to search OID?
    Thanks & Regards,
    Sandeep Pulkundwar

    Yes, you can use SDS namespace to query OID or you can try dbms_ldap oracle database package.

  • How to search contacts using Yahoo Address Book

    I'm sure this is nothing new to many of you, but it was a great discovery for me today. I struggle with not having a contact search on my iPhone -- often remembering the company name but not the person's name. With my Treo, I could search the entire device including contacts, emails, etc. and find what I needed but we're not there yet with the iPhone.
    One way I found around this is to sync your contacts in iTunes with Yahoo Address Book. I then went to address.yahoo.com on the iPhone, logged in and up comes my contacts with a search field at the top of the page. The search engine always found what I wanted and when I go back to the bookmarked site, I don't have to re-login. I also can click on a phone number in a contact on the web page and dial the number.
    So effectively this is a one click for safari, one click for bookmarks and one click for Yahoo Address book and you have a contact search engine. This will be a good workaround for me until Apple hopefully does an update to include contact search.

    Unfortunately I do not believe this will work for me.
    But it is still a "Rube Goldberg" approach to a function that should be included with the contact list.
    I sometimes remember the last name, sometimes the first name, and sometimes I remember the company, when I do not remember the name, and...
    sometimes I remember what town the company is in if I can't remember anything else.
    mikeab

  • How to combine records using SQL?

    If I have the following data:
    Table A
    order_no company_code
    O001 C001
    Table B
    order_no po_no
    O001 P001
    O001 P002
    O001 P003
    Now, I want to combine the data as:
    View A
    order_no company_code po_no
    O001 C001 P001, P002, P003
    If can it be realized using SQL?
    Thanks and Best Regards,
    Su Qian

    Hi Su Qian,
    To get the result like this you should write a function and call that in the select query.
    The function could be like this:
    CREATE OR REPLACE FUNCTION TEST(p_order_no IN B.order_no%TYPE ) RETURN VARCHAR2 IS
    v_po_no VARCHAR2(100);
    BEGIN
    FOR c IN (SELECT po_no FROM B WHERE order_no = p_order_no)
    LOOP
    IF v_po_no IS NULL THEN
    v_po_no := c.po_no;
    ELSE
    v_po_no := v_po_no||','||c.po_no;
    END IF;
    END LOOP;
    RETURN v_po_no;
    END;
    Now you issue the query like this:
    select order_no, company_code, test(order_no) po_no from a;
    This will return you what you want.
    Hope this will help you.
    Best Regards,
    Ramesh Rathi.
    OCP - DBA.
    Zensar Tech Ltd.
    [email protected]
    If I have the following data:
    Table A
    order_no company_code
    O001 C001
    Table B
    order_no po_no
    O001 P001
    O001 P002
    O001 P003
    Now, I want to combine the data as:
    View A
    order_no company_code po_no
    O001 C001 P001, P002, P003
    If can it be realized using SQL?
    Thanks and Best Regards,
    Su Qian

  • How to search records for nth record from a particular record

    I have a query containing a date field and other fields/details. On the form I have a date field and need to know what the date is in the table 60 record after the date entered. The query date field will always remain in the same order but contains random
    dates which may be 20/03/15, 21/03/15 then the next could be 28/03/15. What I want to do is enter a date into the form such as 22/03/15 and be able to populate a second field on the form with a date that is 60 records after 20/03/15. I've tried several ways
    but just can't seem to work it out. Any ideas would be appreciated

    the help so far has been fantastic, all works fine and now I just want to tidy it up a bit. What I am trying to do is put a date into a form textbox and have it work out 60 (which I've changed to 10 to check a bit easier) working days (no weekends and
    no public holidays) and populate a second text box with the date.
    I've set up two tables, one with 10 years of sequential dates and one with holiday. I then have a query to give me just the work days, which it does. This is the query code: (Named qryOfferExpiryDte)
    SELECT tbldates.AllDteIDS, tbldates.AllDte, Weekday([AllDte]) AS WeekDayNo
    FROM tbldates LEFT JOIN tblHolidays ON tbldates.AllDte = tblHolidays.HolidayDte
    WHERE (((Weekday([AllDte]))<>7 And (Weekday([AllDte]))<>1) AND ((tblHolidays.HolidayDte) Is Null));
    The code I have done so far to make it work is:
    Private Sub Command0_Click()
    Dim OfferDte As Date
    Dim InitCount As Integer
    Dim TotalCount As Integer
    OfferDte = txtOfferDte
    InitCount = DCOUNT("*", "qryOfferExpiryDte", "AllDte  <=  #" & Format(OfferDte, "yyyy-mm-dd") & "#")
    TotalCount = 10 + InitCount
    Dim dbs As DAO.Database
    Dim rst As DAO.Recordset
    Dim strSQL As String
    Set dbs = CurrentDb
    strSQL = "SELECT * FROM qryOfferExpiryDte ORDER BY AllDte"
    Set rst = dbs.OpenRecordset(strSQL, dbOpenDynaset)
    If rst.EOF = False And rst.BOF = False Then
    rst.Move TotalCount
    'Debug.Print rst.Fields(0).Name & " = " & rst.Fields(0).Value
    Me.txtExpiryDte = rst.Fields(1).Value
    End If
    rst.Close
    Set rst = Nothing
    Set dbs = Nothing
    End Sub
    To tidy it up I'd like to remove the query (qryOfferExpiryDte) from the dbase and just have it as code. I've tried changing it to:
      Dim strSQlA As String
      strSQLA = "SELECT tbldates.AllDteIDS" & vbCrLf
      strSQLA = strSQLA & "           , tbldates.AllDte" & vbCrLf
      strSQLA = strSQLA & "           , Weekday([AllDte]) AS WeekDayNo" & vbCrLf
      strSQLA = strSQLA & "        FROM tbldates " & vbCrLf
      strSQLA = strSQLA & "   LEFT JOIN tblHolidays " & vbCrLf
      strSQLA = strSQLA & "          ON tbldates.AllDte = tblHolidays.HolidayDte" & vbCrLf
      strSQLA = strSQLA & "       WHERE (((Weekday([AllDte]))<>7 " & vbCrLf
      strSQLA = strSQLA & "         AND (Weekday([AllDte]))<>1) " & vbCrLf
      strSQLA = strSQLA & "         AND ((tblHolidays.HolidayDte) Is Null));"
    and replacing the reference to the query with strSQLA but I just can't get it to work. I keep getting an error saying "Microsoft Jet cannot find the table/query strSQLA.
    Any ideas appreciated.

  • How can i record using my windows soundcard

    everything is fine harware wise i just cant simply record? the yellow indicator does not come up no matter what

    Not quite sure we know what you mean by the "yellow indicator"? Is this something in Audition or in Windows?
    Also see the Audition Help file:
    Adobe Audition Help | Connecting to audio hardware

  • How do you create beans using NetBeans 5.5?

    I am referring to http://java.sun.com/docs/books/tutorial/javabeans/nb/index.html and I'm sorry but I can't follow any of this!
    I have NetBeans IDE 5.5 and I am trying to learn how to write beans using NetBeans, and the lessons involve things I can't find or understand, for example:
    re: http://java.sun.com/docs/books/tutorial/javabeans/writingbean/index.html
    <blockquote>
    Load the JAR file. Use the NetBeans IDE GUI Builder to load the jar file as follows:
    1. Start NetBeans.
    2. From the File menu select "New Project" to create a new application for your bean. You can use "Open Project" to add your bean to an existing application.
    3. Create a new application using the New Project Wizard.
    4. Select a newly created project in the List of Projects, expand the Source Packages node, and select the Default Package element.
    5. Click the right mouse button and select New|JFrameForm from the pop-up menu.
    6. Select the newly created Form node in the Project Tree. A blank form opens in the GUI Builder view of an Editor tab.
    7. Open the Palette Manager for Swing/AWT components by selecting Palette Manager in the Tools menu.
    8. In the Palette Manager window select the beans components in the Palette tree and press the "Add from JAR" button.
    9. Specify a location for your SimpleBean JAR file and follow the Add from JAR Wizard instructions.
    10. Select the Palette and Properties options from the Windows menu.
    11. Expand the beans group in the Palette window. The SimpleBean object appears. Drag the SimpleBean object to the GUI Builder panel.
    </blockquote>
    Sorry, you lost me literally after "Start NetBeans", the rest is Hungarian. I can't find "New Project Wizard"; I can't find "List of Projects", I can't find anything they are talking about nor do I know if any of this is relevant toward my learning how to write beans.
    Re: http://java.sun.com/docs/books/tutorial/javabeans/properties/properties.html
    "Inspecting Properties" seems impossible to do because the Inspector Window only shows a closed folder and nothing else ever. I can't figure out this part of the tutorial either.
    Can someone please explain this 3rd-grade-level to me: How to create a bean using NetBeans?
    Thanx
    Phil

    Phil,
    Before you embark on another very frustrating advanture using NetBeans, please go t hrough the NetBeans tutorial. The "New Project Wizard" is just select from the menu options -- "New Project". The "Hungarian" as you put it will not get better until you spend some time learning NetBeans. Learning something new, like beans, is frustrating enough, but to try to do it and use a tool that is not familiar may be beyond many individuals frustration level.
    Les

  • Search idocs using status message EDIDS

    Hi,
    Is it possible to find out the idocs using status message?
    For example, I need the idocs example in test system which has error message "Vendor & is not defined in company code &"
    How to search idocs using error message?
    Thanks for your help.
    Regards,
    Yogita

    Hello Yogita
    You have to select within table EDIDS directly:
    Example:
    STATXT = Item &: Only &2 &3 from material &4 are available
    STAPA1 = syst-MSGV1
    STAPA2 = syst-MSGV2
    STAPA3 = syst-MSGV3
    STAPA4 = syst-MSGV4
    STATYP = syst-msgty (E, W, I, S, A)
    STAMID = syst-msgid
    STAMNO = syst-msgno
    Regards
      Uwe

  • PA40 recording using ECATT TCD

    Hi,
    i'm new to ecatt.recently we are using ecatt in my project.My requirement is upload the logon details in sap using ecatt.They want logon details like username and password.How we record logon screen.
             one more requirement is upload the employee info using PA40 t.code.They want employee extension ,conversion,hiring,separation.
    pls any one help on this.How i will record using PA40.Any one help on this with screen shots.
    Advanced thanks
    Ravi
    Edited by: Matt on Feb 17, 2009 11:58 AM - subject modified

    Hello,
    Logon to eCATT system , enter transaction SECATT in command field and press enter key, in the test script text box enter the script name with which you want to create the script and once your enter inside the script you have to decide which driver to use to record the transaction.
    Say TCD , then in Pattern function select TCD REC and in popup enter transaction code and maintain target system where you want to record the transaction .
    Once the connection is established to target system then carry out the process with ur required transaction just as how you used to do manually.
    Once recording is complete then save and parameterize all input values and execute the script again with new set of values.
    Thanks and Best regards
    Ajay

Maybe you are looking for