Database --simple problem 2

if i have this line
String query = "UPDATE DVD SET Info='OUT' WHERE Code='" + DVD_Code.getText () + "'";
and the Code value in my database is set to AutoNumber,how do i get the statement on top without getting a data type mismatch error

if i have this line
String query = "UPDATE DVD SET Info='OUT' WHERE
Code='" + DVD_Code.getText () + "'";
and the Code value in my database is set to
AutoNumber,how do i get the statement on top without
getting a data type mismatch errorIt seams that you are trying to put a String into a NUMBER filed. That will not work!
print your query on screen or write it into a file a look at it.
if it is like this:
UPDATE DVD SET Info='OUT' WHERE Code="100"
will not work... because the quotas surrounding the 100 value make it a String value instead of a number
the correct statement would be:
UPDATE DVD SET Info='OUT' WHERE Code = 100
Now 100 is a NUMBER.
If still does not work.. post your data base server name and your table structure

Similar Messages

  • SIMPLE Database Design Problem !

    Mapping is a big problem for many complex applications.
    So what happens if we put all the tables into one table called ENTITY?
    I have more than 300 attributeTypes.And there will be lots of null values in the records of that single table as every entityType uses the same table.
    Other than wasting space if I put a clustered index on my entityType coloumn in that table.What kind of performance penalties to I get?
    Definition of the table
    ENTITY
    EntityID > uniqueidentifier
    EntityType > Tells the entityTypeName
    Name >
    LastName >
    CompanyName > 300 attributeTypes
    OppurtunityPeriod >
    PS:There is also another table called RELATION that points the relations between entities.

    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    check the coloumn with WHERE _entityType='PERSON'
    as there is is clustered index on entityType...there
    is NO performance decrease.
    there is also a clustered index on RELATION table on
    relationType
    when we say WHERE _entityType ='PERSON' or
    WHERE relationType='CONTACTMECHANISM'.
    it scans the clustered index first.it acts like a
    table as it is physically ordered.I was thinking in terms of using several conditions in the same select, such as
    WHERE _entityType ='PERSON'
      AND LastName LIKE 'A%' In your case you have to use at least two indices, and since your clustered index comes first ...
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    Have you ever thought of using constraints in your
    modell? How would you realize those?
    ...in fact we did.We have arranged the generic object
    model in an object database.The knowledge information
    is held in the object database.So your relational database is used only as a "simple" storage, everything has go through your object database.
    But the data schema is held in the RDBMS with code
    generation that creates a schema to hold data.If you think that this approach makes sense, why not.
    But in able to have a efficent mapping and a good
    performance we have thought about building only one
    table.The problem is we know we are losing some space
    but the thing is harddisk is much cheaper than RAM
    and CPU.So our trade off concerated on the storage
    cost.But I still wonder if there is a point that I
    have missed in terms performance?Just test your approach by using sufficiently data - only you know how many records you have to store in your modell.
    PS: it is not wise effective using generic object
    models also in object databases as CPU cost is a lot
    when u are holding the data.I don't know if I'd have taken your approach - using two database systems to hold data and business logic.
    PS2: RDBMS is a value based system where object
    databases are identity based.we are trying to be in
    the gray area of both worlds.Like I wrote: if your approach works and scales to the required size, why not? I would assume that you did a load test with your approach.
    What I would question though is that your discussing a "SIMPLE Database Design" problem. I don't see anything simple in your approach when it comes to implementation.
    C.

  • Hello  Simple problem - don,t know how to solve it.  With Premiere CC when I try to do a selection (click... drag... release the click) very often it stop way before the end of the move I'm swinging the Magic Mouse. I taught that the mouse clicking was de

    Hello
    Simple problem - don,t know how to solve it.
    With Premiere CC when I try to do a selection (click... drag... release the click) very often it stop way before the end of the move I'm swinging the Magic Mouse. I taught that the mouse clicking was defective and went to get a new Magic Mouse after lots of frustration. Today, I have an edit to do it it does the SAME thing !!
    I was like ????#$%?&*(???
    Opened all the lights and taught I've trow the new mouse to the garbage and was using the defective mouse again... no !! - ??
    Actually, the bran new mouse is doing the same thing. What I understand after investigating on the motion and watching carefully my fingers !! -  is that when I click I have to keep my finger at the EXACT same place on the mouse... drag and release and it's fine. If I click by pushing on the mouse and my finder is moving of a 1/32th of a millimeter, it will release and my selection will be to redo. You can understand my frustration ! - 75$ later... same problem, but I know that if I click with about 5 pounds of pressure and trying to pass my finger through the plastic of the mouse, it you stay steady and make it !
    The problem is that scrolling is enable while clicking and it bugs.
    How to disable it ??
    Simple question - can't find the answer !

    Helllooo !?
    sorry but the Magic Mouse is just useless with the new Adobe Premiere CC and since I'm not the only one but can't find answer this is really disappointing. This mouse is just fantastic and now I have to swap from a USB mouse to the Magic Mouse every times I do some editing. My USB mouse if hurting my hand somehow and I want to got back to the Magic Mouse asap. Please - for sure there is a simple solution !
    Thanks !!

  • Please a simple problem but I don't know how to solve it. After installing 16 gb of ram all is good but when I turn on the computer it is a window signaling that all is correct. How is possible to delete once and for all that window? Thank you

    Please a simple problem but I don't know how to solve it. After installing 16 gb of ram all is good but when I turn on the computer it is a window signaling that all is correct. How is possible to delete once and for all that window? Thank you

    Well then maybe you could take a screenshot because the appearance of such a window is news to me.
    Also post your OS X version and what model Mac you have. The more detail, the better. Thanks.
    To take a screenshot hold ⌘ Shift 4 to create a selection crosshair. Click and hold while you drag the crosshair over the area you wish to capture and then release the mouse or trackpad. You will hear a "camera shutter" sound. This will deposit a screenshot on your Desktop.
    If you can't find it on your Desktop look in your Documents or Downloads folder.
    When you post your response, click the "camera" icon above the text field:
    This will display a dialog box which enables you to choose the screenshot file (remember it's on your Desktop) and click the Insert Image button.
    ⌘ Shift 4 and then pressing the space bar captures the frontmost window.
    ⌘ Shift 3 captures the entire screen.
    Drag the screenshot to the Trash after you post your reply.

  • Database termination Problem

    Hi every body ..plz help me on this..
    We are facing database termination problem in ECC6 production syste.
    Database: Oracle 10.2, O/S: Windows 2003. Spam  :27, SP level 13.
    Error is:
    Errors in file f:\oracle\p02\saptrace\background\p02_ckpt_6520.trc:
    ORA-00206: error in writing (block 3, # blocks 1) of control file
    ORA-00202: control file: 'D:\ORACLE\P02\ORIGLOGB\CNTRL\CNTRLP02.DBF'
    ORA-27072: File I/O error
    OSD-04008: WriteFile() failure, unable to write to file
    O/S-Error: (OS 33) The process cannot access the file because another process has locked a portion of the file.
    When we are performing backup then data base termination occuring freequently.
    Give right solution as early as possible.
    Thanks,
    Nani.

    Hi,
    Have a look at below snote which actually speaks about the oracle error codes
    Snote :  546006
    within the Snote it says :-
    " If you cannot access a database file (for instance a data file, control file or RedoLog) for whatever reason, an ORA-270xx appears. The actual cause comes from additional error messages (usually in the operating system) that occur on ORA-270xx. "
    And as per your last update
    " ORA-00206: error in writing (block 3, # blocks 1) of control file
    ORA-00202: control file: 'D:\ORACLE\P02\ORIGLOGB\CNTRL\CNTRLP02.DBF' "
    i think there is problem accessing the database control file. Hence you  are facing the above problem.
    I think if you recreate your control file i think, it should resolve the problem.
    Hope it will be helpful to resolve your problem.
    Rgds
    Radhakrishna D S

  • Very Simple Problem-- Need help in method selection process

    Hello,
    It's difficult to explain the background of the program I am making-- but I am stuck at a very simple problem, that I can only solve with a very long block of if statements:
    I have 3 possible numbers-- 1, 2, or 3.
    Imagine two numbers are already taken-- say 1 and 2. I want a variable to set itself to the number that's not taken (3).
    So, again: If two numbers were taken say 2 or 3-- I want the variable to be sent to the other one that isn't taken-- 1.
    Thank you for your help,
    Evan.

    Actually, I'll just tell you the context of the program-- here is what I have so far:
    This program is meant to simulate Monty Hall Problem:
    http://en.wikipedia.org/wiki/Monty_Hall_problem
    The program sets up an array of three possible values. Each one of those values represents a door with either a goat or a car behind it. It then randomly sets one of those values to 1 (in order to represent a car as per the Monty Hall problem), and 0's represent goats.
    The user, which is simulated by the program (does not involve actual interaction), chooses a door initially.
    The game show hosts then reveals a door that is not the users initial choice, but IS a goat ( an array value of 0).
    For example if the array was [0][0][1]
    The user could pick door one (array position 0). Which is a goat.
    The game show host then reveals a goat that is not the users choice-- which would be array position 1.
    After the game show host reveals the goat-- I want the user to always switch his decision to the only other remaining door that was not his first choice.
    Then I wanted the computer to test to see if his final choice is the one with a car. And to tally up the amount of times he got it right.
    --Sorry that was long winded:
    import TerminalIO.*;//imports TerminalIO package for system.out.println
    import java.util.*;//import java.util for random
    public class Monty_Problem
         int doors[]= {0,0,0};
         Random rand= new Random();
         double wins,totals=0;
         public void carAssignment()
              int car_door= rand.nextInt(3);
              doors[car_door]=1;
         public int judgesChoice(int judgeDoor, int initialChoice)
              if(judgeDoor != initialChoice && doors[judgeDoor]!=1)
                   return judgeDoor;
              else
                   return judgesChoice(rand.nextInt(3), initialChoice); //infinite loop right here that I cannot remedy.  I want the program to have the judge pick a location that is not occupied by a  '1' and is not the user's choice. 
         public void gamePlaySwitches()
              int initialChoice= rand.nextInt(3);
              int judgeDoor = 0;
              int secondChoice= 0;
              judgeDoor= judgesChoice(rand.nextInt(3), initialChoice);
              //This part is meant to have the user switch choices from his initial choice
                   // to the only other choice that hasn't been revealed by the judge. 
              while(secondChoice == initialChoice || secondChoice== judgeDoor)
                   secondChoice++;
              if(doors[secondChoice]==1)
                   wins++;
                   totals++;
              else
                   totals++;          
         public static void main(String [] args)//creates the main menu
              Monty_Problem a= new Monty_Problem();
              int games=0;
              while(games!=100)
                        a.carAssignment();
                        a.gamePlaySwitches();
                        games++;
              System.out.println(a.wins/a.totals);
    }Edited by: EvanD on Jan 11, 2008 4:17 PM

  • A Simple problem I`m sure BUT ITS DRIViNG ME CRAAAZY!

    Hello,
    I hope someone can help.
    I published a site with the first podcst episode using iweb.It went through onto iTunes bo problem so all`s good... so today I put together the 2nd episode, submit it to itunes as before...up comes the `..please provide the link to the podcast RSS feed ...' etc
    Podcast Feed URL:http://rss.mac.com/jubemeg/iWeb/Bandwagon/podcast/rss.xml is the address I`m given as with the first episode, I press continue and ....Unfortunatly THE FEED HAS ALREADY BEEN SUBMITTED.Course it has! Help!
    I have looked through the tech specs and I cant make head nor tail of it can someone help me in real basic layman language!
    Thank you,
    Jules

    Jules, it's a simple problem with a simple fix. (and it drove me nuts too)
    Publish to .Mac (or your server if it's different)... then PING itunes to let them know to go look for new content on your server (or .Mac). You PING iTunes by cutting and pasting the url addy below into safari and clicking return. You'll get an error message, don't worry, it's supposed to happen. About an hour later, maybe a bit longer, your new episode will be available.
    DONT submit your podcast by selecting the "SUBMIT PODCAST TO ITUNES" menu selection again. That command is for your first submission, not your subsequent ones. Think of your podcast as a book. And each episode is a chapter. When you ping iTunes, they go get the whereabouts of the new chapter and make it available for the world to come and read, hear, or watch.
    the PING url is...
    https://phobos.apple.com/WebObjects/MZFinance.woa/wa/pingPodcast?id=INSERTYOURFE EDIDHERE
    Your feed ID number is in your original email from the itunes folks when they sent you your acceptance email and said that your podcast was now up and running on the ITMS.
    Hope this helps.
    Jim
    20" Imac 1ghz (lmpstd), Mini, G4 Dual 1.8(upgraded), G4 400, Powerbook,12", eMac   Mac OS X (10.4.4)  

  • A simple problem in j2sdk

    I am in a great problem with a very simple problem. I am new to J2EE. I had installed j2sdk1.4.0_03 / tomcat 4.1 in windows 2000. my problem is that the servlets are not being compiled. The error is " package javax.servlet is not found". error are also there in all the classes of this packege like in HttpServletResponse, HttpServletRequest etc.
    The classpath are correct. One of my friend is working with the same version and with the same classpath but in Windows XP..
    can anyone tell me why this is happening. and how to overcome this. PLEASE...............

    Add the jar that contains the javax.servlet package to your javac classpath using the -classpath option. Not sure why your CLASSPATH isn't working maybe youi have some invalid characters or directories with spaces that aren't quoted etc... I believe the servlet APIs are in servlet-api.jar, or at least they are in 5.0. Also please searxh the forums in the future this is a pretty typical question and has been answered numerous times.

  • A simple problem to solve... I hope.

    $A simple problem to solve... I hope. Hi Guys,
    This is my first post on this forum, and I'm hoping that the problem I'm encountering at the moment is down to my own stupidity rather than technical issues.
    Firstly, I should mention that I have used my X-fi sound blaster xtreme audio card for months now in my old PC which was running XP 32 bit with no problems whatsoever. In the last day I've built a new PC which has the following specs:
    Intel I7 860
    tb HDD
    4gb Ram
    Windows 7 Ultimate 64
    Nvidia GTX280
    Sound was very quiet and of a fairly poor quality to begin with, and I soon realised that I hadn't installed any drivers for the soundcard, so I went ahead and did so. Following this, I enter a **bleep**storm of illogical proportions which to me makes absolutely no sense.
    I get no sound from my speakers or headphones whatsoever. I have a pair of M-Audio AV-40 monitors at the moment, and no matter what I try, I can't get sound to work. When I go to the mixer, it seems odd to me
    http://yfrog.com/7fxfiproblemj
    I thought that there would be options for Line Outs etc, but I may be wrong.
    I've run the diagnostic tests and everything comes back absolutely fine.
    The weirdest thing however is the fact that when I test the speaker configuration, it responds to nothing except from the 7. surround sound, and my speakers react to the bottom left and bottom right speakers. I've tried installing, re-installing drivers no end. Looked for fixes and checked google as well and found nothing that matches the description of my problem.
    Am I missing out on something really obvious here? Or is there a more technical underlying factor ?behind this issue.
    Any help is hugely appreciated, thanks?

    Thanks for all of you help, but I still don't think the problem's solved.
    Here's the problem explained more thouroloy. I have a java program that uses lots of jar files. That means that to run my program, I need to have the CLASSPATH set to pick up all of these jar files. I'd also like to be able to give someone a copy of this program on a cd and have them immediately run it without having to assume anything about their configuration (except that they have java installed).
    So what I did was create a batch file that (at least temporarily) sets up the CLASSPATH to meet my needs. It then calls "java myProgram <all the other parms...>".
    Things run fine, except that the command window that gets opened up stays around while Swing program runs, and doesn't close until I close the Swing program. I'd like that that didn't happen.
    -- echo off
    Not going to do anything to help. It will stop the batch commands from echoing, but that's about it.
    -- javaw
    I tried this and it also doesn't work. It seems that neither java nor javaw return until after the program that it is running actually end.
    -- Executable jar
    Sounds promising, but will it work? How do I make sure the CLASSPATH is properly set before running this?
    Thanks again for all of your hlep.
    Sander Smith

  • Immediate HELP in Tomcat 5 to Postgresql 7.4 database connectivity problem

    Hi,
    I failed to connect Tomcat 5.0.24 with Postgresql
    7.4.2. The files created by me and the changes i had
    made in the existing files are rates.jsp,
    conversionDAO.java, web.xml and server.xml. The error
    message on the top of the rest of it was "The value of
    useBean class attribute converter.conversionDAO is
    invalid". So far I found out that the coding for
    database connectivity purpose in conversionDAO.java
    cause the error. Another thing is Postgresql jdbc
    driver is required to set in the CLASSPATH for the
    java file to access the Postgresql database. I don't
    know where should I put it in Tomcat for web
    application. Anyway, I put it in
    $CATALINA_HOME/shared/lib according the book i
    refered. I do the database connectivity coding refer
    to the Tomcat Kick Start book from Sams Publishing.
    Below are the coding involved, please show me the
    mistake i had made. Thank you.
    ----server.xml----
    <Context path="/database"
    docBase="${catalina.home}/webapps/database" debug="0"
    reload="true">
    <ResourceParams name="jdbc/conversion">
    <parameter>
    <name>username</name>
    <value>myusername</value>
    </parameter>
    <parameter>
    <name>password</name>
    <value>mypassword</value>
    </parameter>
    <parameter>
    <name>driverClassName</name>
    <value>org.postgresql.Driver</value>
    </parameter>
    <parameter>
    <name>url</name>
    <value>jdbc:postgresql://localhost/conversion</value>
    </parameter>
    </ResourceParams>
    </Context>
    ----web.xml----
    <servlet>
    <servlet-name>conversionDAO</servlet-name>
    <servlet-class>converters.conversionDAO</servlet-class>
    </servlet>
    <resource-ref>
    <res-ref-name>jdbc/conversion</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    ----conversionDAO.java----
    public conversionDAO() throws SQLException,
    NamingException
    Context init = new InitialContext();
    Context ctx = (Context)
    init.lookup("java:comp/env");
    DataSource ds = (DataSource)
    ctx.lookup("jdbc/conversion");
    con = ds.getConnection();
    select = con.prepareStatement(
    "SELECT rate FROM Exchange WHERE src= ? AND dst =

    Immediate HELP in Tomcat 5 to Postgresql 7.4 database connectivity problem (cont.)
    Errors log
    2004-06-06 01:07:53 StandardContext[servlets-examples]SessionListener: contextDestroyed()
    2004-06-06 01:07:53 StandardContext[servlets-examples]ContextListener: contextDestroyed()
    2004-06-06 01:07:53 StandardContext[jsp-examples]SessionListener: contextDestroyed()
    2004-06-06 01:07:53 StandardContext[jsp-examples]ContextListener: contextDestroyed()
    2004-06-06 01:07:59 StandardContext[balancer]org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache.webapp.balancer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News / Redirect URL: http://www.cnn.com], [org.apache.webapp.balancer.rules.RequestParameterRule: Target param name: paramName / Target param value: paramValue / Redirect URL: http://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: http://jakarta.apache.org]]
    2004-06-06 01:08:00 StandardContext[jsp-examples]ContextListener: contextInitialized()
    2004-06-06 01:08:00 StandardContext[jsp-examples]SessionListener: contextInitialized()
    2004-06-06 01:08:00 StandardContext[servlets-examples]ContextListener: contextInitialized()
    2004-06-06 01:08:00 StandardContext[servlets-examples]SessionListener: contextInitialized()
    2004-06-06 01:08:01 StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception
    org.apache.jasper.JasperException: /rates/rates.jsp(5,0) The value for the useBean class attribute converters.conversionDAO is invalid.
         at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
         at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:357)
         at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:141)
         at org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1217)
         at org.apache.jasper.compiler.Node$UseBean.accept(Node.java:1116)
         at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
         at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
         at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2219)
         at org.apache.jasper.compiler.Node$Root.accept(Node.java:456)
         at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
         at org.apache.jasper.compiler.Generator.generate(Generator.java:3261)
         at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:244)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:422)
         at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:507)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:274)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
    ----more----

  • Database configuring problem in setup of managed systems in SMD

    Hello,
    i'm doing the setup of a CRM 5.0 in SMD Abap+Java and the setup results returns following:
    "Database configuration problem"  with the exception:
    java.lang.NullPointerException
         at com.sap.smd.server.manager.SMDPluginProperties.setProperty(SMDPluginProperties.java:114)
         at com.sap.smd.agent.plugins.database.ConfigurationTask.configureCustomProperties(ConfigurationTask.java:242)
         at com.sap.smd.agent.plugins.database.ConfigurationTask.configureProperties(ConfigurationTask.java:370)
         at com.sap.smd.agent.plugins.database.ConfigurationTask.execute(ConfigurationTask.java:124)
         at com.sap.sup.admin.setup.AppCfgTasks.configureDbApp(AppCfgTasks.java:115)
         at com.sap.sup.admin.setup.SetupStep.execute(SetupStep.java:202)
         at com.sap.smd.agent.plugins.remotesetup.SapInstance.setup(SapInstance.java:217)
         at com.sap.sup.admin.setup.SapCluster.setup(SapCluster.java:461)
         at com.sap.sup.admin.setup.SapCluster.access$000(SapCluster.java:26)
         at com.sap.sup.admin.setup.SapCluster$SetupRunner.run(SapCluster.java:669)
         at java.lang.Thread.run(Thread.java:534)
    Anybody knows which can be the problem?
    Thanks a lot
    Carlos

    Hi Shriraj,
    ensure that the installation path is correct. I only put /urs/sap/<SID> and you must put /usr/sap/<SID>/DV***/.
    In my case with that the setup returns all in green.
    I hope it helps you
    Regards
    Carlos

  • Database connection problem when i try store the values in JTable

    Hi Sir,
    I have a database connection problem when i try to store the data's in a JTable.I think the problem is with in the database connection.I have used 3 vectors here.The database which i have used is
    Access.Where the program is compiling well.But when i run it only the first column heading is printed and error message showing that
    "Invalid Cursor State".I need to solve this problem.pls. do help me.
    I will provide u with the code.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import java.util.*;
    import java.sql.*;
    public class DataBaseVector extends JPanel
    //Container contentPane=getContentPane();
    JScrollBar jsb = new JScrollBar(JScrollBar.HORIZONTAL);
    JScrollBar jsb1 = new JScrollBar(JScrollBar.VERTICAL);
    Image i1;
    String url="jdbc:odbc:Ananth";
    Vector col=new Vector();
    Vector rows=new Vector();
    Vector rdata=new Vector();
    Connection conn;
    public DataBaseVector()
    //super("JTable With ScrollBars");
    this.setLayout(new BorderLayout());
    UIManager.put("ScrollBar.track",Color.red);
    UIManager.put("ScrollBar.thumb",Color.blue);
    try
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    conn=DriverManager.getConnection(url); // Is there any problem here?
    Statement st=conn.createStatement();
    ResultSet rs=st.executeQuery("Select * from AccountMaster");
    // rs is the result set obtained
    ResultSetMetaData rsmd=rs.getMetaData();
    int cols=rsmd.getColumnCount();
    for(int i=1;i<=cols;i++)
    col.addElement(rsmd.getColumnName(i));
    rdata.addElement(rs.getString(i));
    rows.addElement(rdata);
    }catch(Exception e)
         System.out.println("The Error Message was:"+e.getMessage());
    JTable jt=new JTable(rows,col);
    int v=ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED;
    int h=ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED;
    JScrollPane jsp=new JScrollPane(jt,v,h);
    this.add(jsp,BorderLayout.CENTER);
    this.add(jsb, BorderLayout.SOUTH);
    this.add(jsb1, BorderLayout.EAST);
    public static void main(String args[])
    JFrame jf=new JFrame();
    JPanel frame=new DataBaseVector();
    jf.getContentPane().add(frame);
    jf.setSize(800,600);
    jf.setVisible(true);
    Thanx,
    m.ananthu

    The problem is ResultSet.next() is not called.
    Try this and modify the table creation as you need.
    ResultSetMetaData rsmd=rs.getMetaData();
    int cols=rsmd.getColumnCount();
         while(rs.next()) {
              for(int i=1;i<=cols;i++)
                        col.addElement(rsmd.getColumnName(i));
                        rdata.addElement(rs.getString(i));
              rows.addElement(rdata);
    Hope this helps

  • I loaded Mac OS X v10.7 Lion yesterday. Everything's running fine, except for a simple problem. Any time I want to copy a file, JPEG, etc., I am prompted "Finder wants to make changes. Type your password to allow this." I don't want this!! Is there a way

    I loaded Mac OS X v10.7 Lion yesterday. Everything’s running fine, except for a simple problem. Any time I want to copy a file, JPEG, etc., I am prompted “Finder wants to make changes. Type your password to allow this.” I don’t want this!! Is there a way to unlock “Finder” or rid this process?

    Back up all data.
    This procedure will unlock all your user files (not system files) and reset their ownership and access-control lists to the default. If you've set special values for those attributes on any of your files, they will be reverted. In that case, either stop here, or be prepared to recreate the settings if necessary. Do so only after verifying that those settings didn't cause the problem. If none of this is meaningful to you, you don't need to worry about it.
    Step 1
    If you have more than one user account, and the one in question is not an administrator account, then temporarily promote it to administrator status in the Users & Groups preference pane. You can demote it back to standard status when this step has been completed.
    Triple-click the following line to select it. Copy the selected text to the Clipboard (command-C):
    sudo chflags -R nouchg,nouappnd ~ $TMPDIR.. ; sudo chown -R $UID:20 ~ $_ ; chmod -R -N ~ $_ 2> /dev/null
    Launch the Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
    Paste into the Terminal window (command-V). You'll be prompted for your login password, which won't be displayed when you type it. You may get a one-time warning not to screw up. If you don’t have a login password, you’ll need to set one before you can run the command.
    The command will take a noticeable amount of time to run. Wait for a new line ending in a dollar sign (“$”) to appear, then quit Terminal.
    Step 2
    Boot into Recovery by holding down the key combination command-R at startup. Release the keys when you see a gray screen with a spinning dial.
    When the OS X Utilities screen appears, select
    Utilities ▹ Terminal
    from the menu bar. A Terminal window will open.
    In the Terminal window, type this:
    resetpassword
    That's one word, all lower case, with no spaces. Then press return. A Reset Password window will open. You’re not going to reset a password.
    Select your boot volume ("Macintosh HD," unless you gave it a different name) if not already selected.
    Select your username from the menu labeled Select the user account if not already selected.
    Under Reset Home Directory Permissions and ACLs, click the Reset button.
    Select
     ▹ Restart
    from the menu bar.

  • WLI 7.0 samples database setup problem

    I have just installed WL Platform 7.0. I want to run the WLI samples and did the following:
    1. Started "Integration Database Wizard" for WLI samples and performed "SwitchDB"
    - provided valid database properties for oracle. Completed successfully - config.xml
    for samples is updated.
    2. Ran RunSamples script - Gives database connect problems and database is not created.
    The user/pwd/machine name/SID are all correct.
    I observed that as part of "RunSamples", it again invokes "SwitchDB" (command I see
    is "switchdb oracle"). This resets the database properties in config.xml to the defaults
    - so obviously this is causing the connection problem.
    Pls let me know what is going wrong here?
    Thanks

    Garf,
    You are correct in your analysis. When you run the 'RunSamples' script,
    it will call switchdb and this causes the 'defaults' to be set in
    config.xml. Running the wliconfig utility is the customer experience
    BEA would like to have with regard to setting up the database. However,
    the RunSamples script has not been updated to correctly reflect that the
    customer would have already performed this step. When RunSamples calls
    switchdb, it is getting the defaults from the following location:
    <USER_DEFINED_DOMAIN>/dbInfo/<DATABASE>/setDBVars and setDBVarsExt files
    So for example, if you accepted the default user directory and your
    BEA_HOME is C:/bea and you were using the EAI Domain template calling
    your domain eaidomain and your are using Oracle, you should update the
    following files:
    C:\bea\user_projects\eaidomain\dbInfo\oracle\setDBVars.cmd and
    setDBVarsExt.cmd
    Edit these files to reflect your DB connection properties.
    When RunSamples calls switchdb, these properties will be used to update
    the wliPool in config.xml. I hope this helps and sorry for the
    inconvenience.
    Cheers,
    Chris
    Garf wrote:
    I have just installed WL Platform 7.0. I want to run the WLI samples and did the following:
    1. Started "Integration Database Wizard" for WLI samples and performed "SwitchDB"
    - provided valid database properties for oracle. Completed successfully - config.xml
    for samples is updated.
    2. Ran RunSamples script - Gives database connect problems and database is not created.
    The user/pwd/machine name/SID are all correct.
    I observed that as part of "RunSamples", it again invokes "SwitchDB" (command I see
    is "switchdb oracle"). This resets the database properties in config.xml to the defaults
    - so obviously this is causing the connection problem.
    Pls let me know what is going wrong here?
    Thanks

  • Oracle Database Starting Problem

    Hi all,
    i am having database startup problems.
    my database is working fine but when i try to connect as sysdba then i get the following error
    Connected to an idle instance.
    SQL> select status from v$instance;
    select status from v$instance
    ERROR at line 1:
    ORA-01034: ORACLE not available
    i have also checked the listener and it is also working fine.
    Instance "orcl", status READY, has 3 handler(s) for this service...
    The process is also shown by the pmon command, check through operating system command
    ps -aef |grep pmon
    oracle 3235 2816 0 18:08:15 pts/3 0:00 grep pmon
    oracle 22425 1 0 12:01:57 ? 0:08 ora_pmon_orcl
    Please let me know what to do.
    regards,
    Imran Raza

    Hi Laura,
    Please find below
    bash-3.00$ echo $ORACLE_SID
    orcl
    bash-3.00$ ./lsnrctl status
    LSNRCTL for Solaris: Version 10.1.0.5.0 - Production on 17-FEB-2009 18:58:55
    Copyright (c) 1991, 2004, Oracle. All rights reserved.
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=silverApp0)(PORT=1521)))
    STATUS of the LISTENER
    Alias LISTENER
    Version TNSLSNR for Solaris: Version 10.1.0.5.0 - Production
    Start Date 17-FEB-2009 11:51:42
    Uptime 0 days 7 hr. 7 min. 13 sec
    Trace Level off
    Security ON: Local OS Authentication
    SNMP OFF
    Listener Parameter File /oracle/dba/OraHome1/network/admin/listener.ora
    Listener Log File /oracle/dba/OraHome1/network/log/listener.log
    Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=silverApp0)(PORT=1521)))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
    Services Summary...
    Service "PLSExtProc" has 1 instance(s).
    Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
    Service "orcl.silverapp0.com" has 1 instance(s).
    Instance "orcl", status READY, has 3 handler(s) for this service...
    The command completed successfully

Maybe you are looking for