Searching in a Database plz help!

Hi
i'm stuck...
doe anyone know how to search trough a database (of 10.000 records)
iv'e made a search code butt it doesn;t work with a large database
that's mine first probleem and mine second probleem is how to convert a String to a float and
String to a char
many thanks!!!!!
jessie
i'm programming with Visual J++6.0

I've tried it butt it seems no to work
does anyone know how to get the String name edit1 in Form1 to edit1 in Form2? by clicking the button in Form2
pl help
import com.ms.wfc.app.*;
import com.ms.wfc.core.*;
import com.ms.wfc.ui.*;
import com.ms.wfc.html.*;
* This class can take a variable number of parameters on the command
* line. Program execution begins with the main() method. The class
* constructor is not invoked unless an object of type 'Form1' is
* created in the main() method.
public class Form1 extends Form
     public Form1()
          // Required for Visual J++ Form Designer support
          initForm();          
          // TODO: Add any constructor code after initForm call
     * Form1 overrides dispose so it can clean up the
     * component list.
     public void dispose()
          super.dispose();
          components.dispose();
     * NOTE: The following code is required by the Visual J++ form
     * designer. It can be modified using the form editor. Do not
     * modify it using the code editor.
     Container components = new Container();
     Edit edit1 = new Edit();
     private void initForm()
          this.setText("Form1");
          this.setAutoScaleBaseSize(new Point(5, 13));
          this.setClientSize(new Point(292, 266));
          edit1.setLocation(new Point(80, 64));
          edit1.setSize(new Point(120, 20));
          edit1.setTabIndex(0);
          edit1.setText("");
          this.setNewControls(new Control[] {
                                   edit1});
     * The main entry point for the application.
     * @param args Array of parameters passed to the application
     * via the command line.
     public static void main(String args[])
          Application.run(new Form1());
          Application.run(new Form2());
import com.ms.wfc.app.*;
import com.ms.wfc.core.*;
import com.ms.wfc.ui.*;
import com.ms.wfc.html.*;
* This class can take a variable number of parameters on the command
* line. Program execution begins with the main() method. The class
* constructor is not invoked unless an object of type 'Form2'
* created in the main() method.
public class Form2 extends Form
     public Form2()
          super();
          // Required for Visual J++ Form Designer support
          initForm();          
          // TODO: Add any constructor code after initForm call
     * Form2 overrides dispose so it can clean up the
     * component list.
     public void dispose()
          super.dispose();
          components.dispose();
     private void button1_click(Object source, Event e)
     * NOTE: The following code is required by the Visual J++ form
     * designer. It can be modified using the form editor. Do not
     * modify it using the code editor.
     Container components = new Container();
     Edit edit1 = new Edit();
     Button button1 = new Button();
     private void initForm()
          this.setText("Form2");
          this.setAutoScaleBaseSize(new Point(5, 13));
          this.setClientSize(new Point(300, 300));
          edit1.setLocation(new Point(56, 56));
          edit1.setSize(new Point(136, 20));
          edit1.setTabIndex(0);
          edit1.setText("");
          button1.setLocation(new Point(104, 192));
          button1.setSize(new Point(75, 23));
          button1.setTabIndex(1);
          button1.setText("haal");
          button1.addOnClick(new EventHandler(this.button1_click));
          this.setNewControls(new Control[] {
                                   button1,
                                   edit1});

Similar Messages

  • Multiple field database search problem... plz help me

    Hi,
    I have a search form with 6 search fields. 5 text boxes and one combo box. I want to search values from two tables based on this search keys. I am using 3 tables. Followings are the table structure....
    comp_det
    CREATE TABLE `comp_det` (`comp_id` INT( 11 ) NOT NULL AUTO_INCREMENT ,
    `compname` VARCHAR( 100 ) NOT NULL ,
    `address` VARCHAR( 100 ) NOT NULL ,
    `city` VARCHAR( 100 ) NOT NULL ,
    `state` VARCHAR( 100 ) NOT NULL ,
    `membnum` VARCHAR( 100 ) NOT NULL ,
    PRIMARY KEY ( `comp_id` )) TYPE = MYISAM ;
    pro_det
    CREATE TABLE `comp_det` (`comp_id` INT( 11 ) NOT NULL AUTO_INCREMENT , `pro_name` VARCHAR( 100 ) NOT NULL , PRIMARY KEY ( `pro_id` )) TYPE = MYISAM ;
    comp_prod
    CREATE TABLE comp_prod (comp_id INT NOT NULL,pro_id INT NOT NULL,productName varchar(255),FOREIGN KEY (comp_id) REFERENCES comp_det (comp_id),FOREIGN KEY (pro_id) REFERENCES pro_det (pro_id)) TYPE = MYISAM ;
    These are the search key :
    Company Name (compname from comp_det)
    contact person (personname from comp_det)
    city( city from comp_det)
    state (state from comp_det)
    membership number (membnum from comp_det)
    Products( pro_name from pro_det)
    i tried with with the following sql query. But i couldn't gt the correct result
         String cn="'"+request.getParameter("compname")+"'";
         String cp="'"+request.getParameter("contactperson")+"'";
         String ct="'"+request.getParameter("city")+"'";
         String st="'"+request.getParameter("state")+"'";
         String mn="'"+request.getParameter("membershipnumber")+"'";
         String ps="'"+request.getParameter("pro_name")+"'";
         String slct="";
    slct="select distinct t1.comp_id, t1.compname, t1.personname, t1.city, t1.state, t1.email, t1.website, t2.pro_name from comp_det t1, pro_det t2, comp_prod t3 where t1.compname= " + cn + " or t1.personname= " + cp + " or t1.city = " + ct + " or t1.state = " + st + "or t1.membnum = " + mn + "or t2.pro_id = " + ps + " and t1.comp_id = t3.comp_id ORDER BY t1.compname";
    Please help me..... Its urgent
    Thanks

    hi
    thanks for your reply. Iam using prepared statement.
    here my coding
    String DbDriver = "org.gjt.mm.mysql.Driver";
    String url="jdbc:mysql://localhost:3306/mydb";
         Connection con=null;
         PreparedStatement pstmt=null;
    try {
              Class.forName(DbDriver).newInstance();
    con=DriverManager.getConnection(url,"myuid","mypwd");
         String cn="'"+request.getParameter("compname")+"'";
         String cp="'"+request.getParameter("contactperson")+"'";
         String ct="'"+request.getParameter("city")+"'";
         String st="'"+request.getParameter("state")+"'";
         String mn="'"+request.getParameter("membershipnumber")+"'";
         String ps="'"+request.getParameter("pro_name")+"'";
         String slct="";
              slct="select distinct t1.comp_id, t1.compname, t1.personname, t1.city, t1.state, t1.email, t1.website, t2.pro_name from comp_det t1, pro_det t2, comp_prod t3 where t1.compname= " + cn + " or t1.personname= " + cp + " or t1.city = " + ct + " or t1.state = " + st + "or t1.membnum = " + mn + "or t2.pro_id = " + ps + " and t1.comp_id = t3.comp_id ORDER BY t1.compname";
    pstmt = con.prepareStatement(slct);
              ResultSet rs = pstmt.executeQuery();

  • How to process option value to database, plz help me out

    hi guys,
    can any one help me out in passing the option value to database.
    i have a 4 options, when any option selected, that should be processed to the database
    <form name="createfrm">
    <select name="select">
    <option value="1">1</option>
    <option value="2">2</option>
    <option value="3">3</option>
    <option value="4">4</option>
    </select>
    plz., can any one help me out by giving me the javascript code

    here's the part of the code:
    In th javascript this is the one that populates the array gender[].
    gender1[] array is where i put the values from the database so it is part of the jsp code. You will store what you fetch in gender1[] array.
    Then you store it in another array in javascript using the follwing codes:
    var gender = new Array(
    <%
    out.println("\""+gender1[0]+"\"");
    for(int ip = 1; ip < 3; ip++) {out.println(", \"" + gender1[ip] + "\"");}
    %>
    Now for populating the values of the dropdown list You will use the following codes:
    function fillGenCivil(){
    for (var jj=0; jj<3; jj++){
                                       document.registration1.gender.length++;
                                       document.registration1.gender.options[counta].value = gender[counta];
                                       document.registration1.gender.options[counta].text = gender[counta];
                                       counta++;
    the in the html tags: the form code will be like this
    <select name="gender" class="txtMed" > </select>
    These codes will automatically populate data in your dropdown list

  • Error opening database, Plz help!

    Dear Oracle Gurus,
    I have been getting this error message today, and I dont know what steps to be taken.
    SQL> alter database open;
    alter database open
    ERROR at line 1:
    ORA-16068: redo log file activation identifier mismatch
    ORA-00312: online log 1 thread 1: 'D:\ORACLE\ORADATA\ORCL\REDO01.LOG'
    I am not able to log in with any of the users except a sysdba like sys.
    In other words, I am only able to log into the database thru sys but cannot perform any operations on tables or objects.
    I am running Oracle 9i R2
    Please help how to get rid of this problem.

    ORA-00312 online log string thread string: 'string'
    Cause: This message reports the file name for details of another message.
    Action: Other messages will accompany this message. See the associated messages for the appropriate action to take.
    ORA-00313 open failed for members of log group string of thread string
    Cause: The online log cannot be opened. The file may not be in the expected location.
    Action: Specify the correct redo log file or make the log available, if necessary. Also, see the accompanying messages.
    ORA-00314 log string of thread string, expected sequence# string doesn't match string
    Cause: The online log is corrupted or is an old version.
    Action: Find and install the correct version of the log or reset the logs. Refer to the Oracle9i Database Administrator's Guide for recovery procedures.

  • I Want to connect to database . plz help

    dear programmers
    i use forms9i and oracle database 9i under winxp. the database is on the local machine .
    to connect database from the form i do the following:
    1-choose file | connect from the main menue
    2-type scott/tiger then click on connect
    the following message appear
    ORA-12560 TNS :protocol adapter error.
    please i urgently need to connect to database
    please help

    dear Pamela Gamer
    I really thank u for helping me .
    I did the following :
    1- from Start menu,I select Programs > Oracle9i Developer Suite > Forms Developer > Start OC4J Instance. I waited till the window displays a message that OC4J has been initialized, and I minimized the window,and i did not close it.
    2-I opened my form and connected my database successfuly.
    3- when i started to run my form the same message appeared ( frm-10142: the http listener is not running on 127.0.0.1 at port 8888 . please start the listener or check your runtime perference)
    i do not know why it appeared again .i want to know what is the problem . in fact i hardly need to shift to forms9i, but this problem makes me disapointed.
    if you know the solution , please help me
    thank u again for helping me
    tarek

  • Searching for some software plz help

    i was wndering if anyone knew of software for a mac that is an autotyper....like a macro...that is freeware........or has a trial...something that i can type text in and set the repeat rate..then it automaticly pastes that text for me...
    thanx
    any help is apreciated

    iClip Lite is freeware and will put multiple clipboards in your Dashboard.
    iKey is $30 but it may do more of what you're looking for.
    -Doug

  • Storing emails offline in database problem plz help me

    hello friends all .
    i wana store all the emails which i get from INBOX folder in database i am using Microsoft Access 2000 for it the below code get all the mails from INBOX and are stored in Array now plz some one help and send a code to store each field of message in data base..
    my database table name is mails
    Fields name -------------------Data Type
    mailid ----------------------- Autonumber
    from -------------------------- Text max length 255 chars (avaliable)
    to ---------------------------- Text max length 255 chars (avaliable)
    bcc --------------------------- Text max length 255 chars (avaliable)
    cc ---------------------------- Text max length 255 chars (avaliable)
    subject ------------------------ Text max length 255 chars (avaliable)
    attachments -------------------- Text max length 255 chars (avaliable)
    now what i want is to store the path of attachments store in directory
    Properties props = new Properties();
    String host = pop3.getText ();
    String provider = "pop3";
    try {
    Session session = Session.getDefaultInstance (props,
    new MailAuthenticator());
    Store store = session.getStore (provider);
    store.connect (host,null,null);
    Folder inbox = store.getFolder ("INBOX");
    if (inbox== null){
    System.out.println ("no inbox");
    inbox.open (Folder.READ_ONLY);
    Message[] messages= inbox.getMessages ();
    for (int i =0 ; i<messages.length;i++){
    messages.writeTo(System.out)
    // what should i do here to store each message in database plz help me
    inbox.close (false);
    store.close ();
    catch(Exception ep){
    ep.printStackTrace();
    i'll be very thankfull plz help i try my best but didnt get success plz plz ! send a working code which i can learn and implement or send any file which do this work so that i can get help .
    thank you

    Unfortunately what you are trying to do is a little more complicated than just posting some code.
    To get the message content and any attachments you need to "parse" the MIME message you get from the store. An email will (should) be a multipart mime construct. You need to get all the "Parts" out of the message and put them into your relevant database fields.
    The "header" elements can be obtained just using the methods of the Message objects you are getting back. Have a look at the javadoc for the javax.mail.Message abstract class.
    As for example code, here's some old code I had lying around which parses a multipart message to get the various parts.
    There is a sample "main" method which should explain how it works:
    import javax.mail.*;
    import javax.mail.internet.*;
    import java.util.*;
    import java.io.*;
    * <p>Title: </p>
    * <p>Description: Parses a mime message to get the relevant parts.<BR>
    * <p>Copyright: Copyright (c) 2002</p>
    * @author Jason Polites
    * @version 1.0
    public class MimeMessageParser {
       * Gets the parts from the MimeMessage
       * Use null contentType to ignore
       * Use null disposition to ignore
      public static void getParts(List parts, Part p, String contentType, String disposition)
          throws MessagingException, IOException
        Object content = p.getContent();
        String currentDisposition = p.getDisposition();
        String currentContentType = p.getContentType();
        // now we need to check if the part was a multipart...
        if(content instanceof Multipart)
          Multipart mp = (Multipart)content;
          // Now we need to delve into the parts
          for(int i=0;i<mp.getCount();i++)
            getParts(parts, mp.getBodyPart(i), contentType, disposition);
        // check to the contentType
        if(contentType == null) {
          // we don't need to check
          if(disposition == null) {
            // no need to check
            // add the part
            parts.add(p);
            //index++;
          else if(currentDisposition != null && currentDisposition.startsWith(disposition))
            // add the part
            parts.add(p);
        else if(p.isMimeType(contentType)) {
          // Check the disposition
          if(disposition == null) {
            // no need to check
            // add the part
            parts.add(p);
          else if(currentDisposition != null && currentDisposition.startsWith(disposition))
            // add the part
            parts.add(p);
       * Gets the parts which match any of the dispositions
       * @param parts
       * @param contentTypes
       * @param disposition
       * @return
      public static List getMultiplePartsFromList(List parts, String contentType, String[] dispositions)
          throws IOException, MessagingException
        List matchedParts = null;
        for(int i = 0; i < dispositions.length; i++) {
          if(matchedParts == null) {
            matchedParts = getPartsFromList(parts, contentType, dispositions);
    else
    matchedParts.addAll(getPartsFromList(parts, contentType, dispositions[i]));
    return matchedParts;
    public static List getPartsFromList(List parts, String contentType, String disposition)
    throws MessagingException, IOException
    LinkedList matchedParts = new LinkedList();
    Part p = null;
    Object content = null;
    String currentDisposition = null;
    String currentContentType = null;
    for(int i = 0; i < parts.size(); i++) {
    p = (Part)parts.get(i);
    content = p.getContent();
    currentDisposition = p.getDisposition();
    currentContentType = p.getContentType();
    if(contentType == null) {
    // we don't need to check
    if(disposition == null) {
    // no need to check
    matchedParts.add(p);
    else if(currentDisposition != null && currentDisposition.startsWith(disposition))
    matchedParts.add(p);
    else if(p.isMimeType(contentType)) {
    // Check the disposition
    if(disposition == null) {
    // no need to check
    matchedParts.add(p);
    else if(currentDisposition != null && currentDisposition.startsWith(disposition))
    matchedParts.add(p);
    return matchedParts;
    public static void main(String[] args) {
    try {
    File email = new File("C:\\test.eml");
    InputStream source = null;
    MimeMessage message = null;
    MimeMessageParser parser = null;
    parser = new MimeMessageParser();
    // First, construct an inputstream for the message file
    source = new FileInputStream(email);
    String host = "localhost";
    boolean sessionDebug = false;
    // Create some properties and get the default Session.
    Properties props = System.getProperties();
    props.put("mail.host", host);
    props.put("mail.transport.protocol", "smtp");
    Session mailSession = Session.getDefaultInstance(props, null);
    // Set debug on the Session so we can see what is going on
    // Passing false will not echo debug info, and passing true
    // will.
    mailSession.setDebug(sessionDebug);
    message = new MimeMessage(mailSession, source);
    // parse the message...
    LinkedList parts = new LinkedList();
    MimeMessageParser.getParts(parts, message, null, null);
    Part p;
    Attachment a;
    String[] dispositions = new String[2];
    dispositions[0] = MimeMessage.INLINE;
    dispositions[1] = MimeMessage.ATTACHMENT;
    List attachments = MimeMessageParser.getMultiplePartsFromList(parts, null, dispositions);
    //Just for testing.. print out the parts...
    for(int i = 0; i < attachments.size(); i++) {
    System.out.println("Part " + i + " content type: " + ((Part)attachments.get(i)).getContentType());
    catch (Exception ex) {
    ex.printStackTrace();

  • App Store Is Not Working ??? plz help

    Hey guys I updated my iPod (4th generation) to iOS6.1.2 about 2 weeks ago but suddenly yesterday my App Store stopped working. When I open it it's all blank in features,search,etc?? Plz help how can I make my App Store work ??

    Try:
    - Reset the iOS device. Nothing will be lost
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Go to Settings>iTunes and App Stores and sign out and sign back in
    - Reset all settings
    Go to Settings > General > Reset and tap Reset All Settings.
    All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
    - Restore from backup. See:                                 
    iOS: How to back up           
    - Restore to factory settings/new iOS device.
    If still problem, make an appointment at the Genius Bar of an Apple store since it appears you have a hardware problem.
    Apple Retail Store - Genius Bar          

  • Plz help to to transfer excel or acess data to Oracle 10g database

    Plz help me to transfer excel or acess data to Oracle 10g database.
    I have excel and acess sheet data here i wanna transfer it to oracle database. Plz guide me how to this
    Message was edited by:
    user582212

    There are several ways, such as ODBC or migration workbench, which is also mentioned in the current article on sqldeveloper on OTN, here's the link. If you use this forum's search function, you should find several threads regarding this topic.
    C.
    Message was edited by:
    cd

  • Plz help using ms access as database,i want to create a login page in java

    hye frnz... plz help me m new to java
    m using ms access as database and try to create a login page where user type username and pw
    i had enter valid user entries in database i checked connectivity is working i want as user login the main window must open after checking username and pw field to database but
    now there is an error class not found exception sun:jdbc...... error
    plz help me i had stuck frm 4 days */
    import java.sql.DriverManager;
    import java.sql.Connection;
    import java.sql.Statement;
    import java.sql.ResultSet;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    class Login extends JFrame
    //Component Declarations
    JLabel jlb1,jlb2;
         JTextField jtf1;
         JPasswordField jpf1;
         JButton jb1,jb2;
         //Constructor
         Login()
         //frame settings
              setTitle("Login Dialog");
              setLayout(new GridBagLayout());
              GridBagConstraints gbc = new GridBagConstraints();
              setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
              Dimension d= Toolkit.getDefaultToolkit().getScreenSize();
              setBounds(d.width/2-175,d.height/2-100,350,200);
              gbc.insets=new Insets(7,7,7,7);
         //adding components
              jlb1=new JLabel("User ID");
              gbc.gridx=0;
              gbc.gridy=0;
              add(jlb1,gbc);
              jlb2=new JLabel("Password");
              gbc.gridx=0;
              gbc.gridy=1;
              add(jlb2,gbc);
              jtf1=new JTextField(10);
              gbc.gridx=1;
              gbc.gridy=0;
              add(jtf1,gbc);
              jpf1=new JPasswordField(10);
              gbc.gridx=1;
              gbc.gridy=1;
              add(jpf1,gbc);
              jb1=new JButton("Login");
              gbc.gridx=0;
              gbc.gridy=2;
              add(jb1,gbc);
              jb1.addActionListener(new ActionListener()
                   public void actionPerformed(ActionEvent ae)
                   Connection conn=null;
                        Statement stmt=null;
                        boolean found=false;
                   try
                             Class.forName("sun.jdbc.driver.JdbcOdbcDriver");
                             String dataSourceName = "Inventory";
                             String dbURL = "jdbc:odbc:" + dataSourceName;
                             conn=DriverManager.getConnection(dbURL, "","");
                             stmt=conn.createStatement();
                             ResultSet rst=stmt.executeQuery("Select * from User");
                             System.out.println(jtf1.getText()+"/t"+jpf1.getPassword());
                             while(rst.next())
                                  System.out.println( rst.getString(1) +"/t"+ rst.getString(2));
              if(jtf1.getText().equals(rst.getString(1).trim()) && new String(jpf1.getPassword()).equals(rst.getString(2).trim()))
                                       found=true;
                                       rst.close();
                                       dispose();
                                       MainWindow mw= new MainWindow();     /*created min window object created to be opend after login but not working*/     
                                       break;
                             rst.close();
                             stmt.close();
                             conn.close();                    
                        catch(ClassNotFoundException e){System.out.print(e);}
                        catch(Exception e){System.out.print(e);}
                        if(found==false) /*this portion is executing and dialog box appears invalid name and pw with class not found exception sun:jdbc.......on console */
                             JOptionPane.showMessageDialog(null,"Invalid username or password",
                                  "Error Message",JOptionPane.ERROR_MESSAGE);
              jb2=new JButton("Clear");
              gbc.gridx=1;
              gbc.gridy=2;
              add(jb2,gbc);
              jb2.addActionListener(new ActionListener()
                   public void actionPerformed(ActionEvent ae)
                        jtf1.setText("");
                        jpf1.setText("");
                        jtf1.requestFocus();
              setSize(350,200);
              setVisible(true);
              jtf1.requestFocus();
         public static void main(String args[])
    Login l=new Login();
    Edited by: 795772 on Sep 19, 2010 4:44 AM

    795772 wrote:
    hye frnz... plz help me m new to java
    m using ms access as database and try to create a login page where user type username and pw
    i had enter valid user entries in database i checked connectivity is working i want as user login the main window must open after checking username and pw field to database but
    now there is an error class not found exception sun:jdbc...... error
    plz help me i had stuck frm 4 days */
    <snip>The subject of this forum is Oracle databases. How does your problem relate to that subject?
    Two bits of advice:
    1) Make sure you ask questions in a forum related to your problem.
    2) If you want to be taken seriously as a professional, drop the MS IM Speak and use the language of the forum. In this forum it is English, which is successfully used by many people for whom English is far from their native language.

  • MySQL  database? Plz help.

    Hi all
              I am doing a project in p2p video conferencing.So to maintain all the user details can I use MySQL database. Is there any other appropriate databases?
                Plz help me with any tutorials if any one knows.
    Advance thanx

    Yes,
    You can use any database and backend. All you need for video chatting is to exchange identities using a webservice that spits out xml.
    Download the sample application
    http://labs.adobe.com/technologies/stratus/samples/#resources
    In it you will find a python cgi script. The script is self explanatory on how to configure a web service. It uses SQLite but you can use mysql or any other database.

  • Ios 6 have some bugs on ipod touch 4g like appstore search bug and accessibility which i cant go out from and crashes every where and imassages that the massge i send goes up and stick to the other messages plz help or do ios 6.1

    Ios 6 have some bugs on ipod touch 4g like appstore search bug and accessibility which i cant go out from and crashes every where and imassages that the massge i send goes up and stick to the other messages plz help or do ios 6.1 can i change my a4 chip plz i swear when i pressed done to submite this safari crashed

    Try to do a hard reboot (no data is lost) by holding down the home and power buttons at the same time untilyou see the Apple logo. Then, let go of both buttons. If that doesn't work, try restoring your iPod and do NOT restore from a backup. This will erase your data, but you can sync back everything except app data and settings from iTunes.

  • Hi, plz help me. i wanna store photos to sql database. so how to insert file field into insert record in dreamweaver cs3?

    I dont know how to insert file field into insert record in DW. i also want to know, insert dynamic table with image field. Plz help me anyone. Ty..

    ohh kk thank you bro. But How to store photos to server file. I wanna upload and display the photos in webpage. Can you send me the php code for this?

  • How to use % wildcard in jdbc plz help me

    Hello all,
    try
         PreparedStatement st=dbcon.prepareStatement("select * from stud2  where ename=? ");
    st.setString(1,ename+"%");
    ResultSet rs=st.executeQuery();
    while(rs.next())
    out.println("<td>");
    out.println(rs.getString(2));//this field is for name
    out.println(rs.getString(3));//this is for addresss
    }catch(Exception e){}This code is in servlets,and iam using MS-ACCESS as database.
    in this way iam trying this code , usage of %wild card but iam not getting the right anser, i want the anser if i will type any letter it should search the database and display me all names of that letter
    plz help me solving this problem
    vidya.

    PreparedStatement ps = con.prepareStatement("select blah from blah where blah like ?");
    ps.setString(1, "a%"); // everything that starts with 'a'
    rs = ps.executeQuery();

  • Whenever i type something in google or any other website, a find tab with pink colour comes beneath the screen and i cannot type anything on google..whatever i enter goes in the find tab.....plz help

    whenever i type something in google or any other website a find tab pink colour comes beneath the screen and i cannot ype anything on google. whatever i type goes in the find tab and i cannot type anything on website......plz help
    == This happened ==
    Every time Firefox opened
    == 10 days ago

    Do a malware check with a few malware scan programs.
    You need to use all programs because each detects different malware.
    Make sure that you update each program to get the latest version of the database.
    http://www.malwarebytes.org/mbam.php - Malwarebytes' Anti-Malware
    http://www.superantispyware.com/ - SuperAntispyware
    http://www.safer-networking.org/en/index.html - Spybot Search & Destroy
    http://www.lavasoft.com/products/ad_aware_free.php - Ad-Aware Free
    http://www.microsoft.com/windows/products/winfamily/defender/default.mspx - Windows Defender: Home Page
    See also "Spyware on Windows": http://kb.mozillazine.org/Popups_not_blocked and [[Searches are redirected to another site]]

Maybe you are looking for

  • How to use BAPI_BILLINGDOC_CREATEMULTIPLE ?

    Hi, Does anyone have an example of how to use BAPI BAPI_BILLINGDOC_CREATEMULTIPLE? I am trying to create a billing document with reference to a delivery (I am hoping that this BAPI will take into account the copy control config so I won't have to do

  • KeyStore functionality

    Hi All, Exploring KeyStore functionality to be implemented in File Adapter. As per the info, SOAP , Mail adapters support this functionality. Pls let me know whether the KeyStore functionality can be implemented in File Adapter using EJB or any other

  • Java in Oracle

    Hi, Wanted to know to what extent java is used in Oracle siebel CRM. Heard the main core work is in C++. I have 2 + exp in java will it be good to work in this area. * Heard java has only UI development part in this.(is jsp used) To what extend is ja

  • Pasting links into Pages

    How can I copy text which contains links from a webpage, then paste the text with the links intact into a Pages document? The webpage is http://shotkit.com/ross-harvey (I am the website owner) Thank you

  • Plugin-container CPU usage

    I left Firefox (V:5) running while I did some other things. I was away from the machine for several hours. When I got back to the computer, I noticed Windows Task Manager was showing heavy CPU use. the 'plugin-container.exe' showed around 40% of the