Probably a simple resultset problem???

Hi everyone, basically when i select a shop from a combo box it populates the table with employees of this shop, if there are no employees in the shop (nothing in the result set) i would like an error message to be displayed telling the user there are no employees within that shop. However im having problems with two varieties of code to do this, see below:
//PROBLEM ONE: This code shows the correct error message and shows the employees but only the employees after the first ame in the result set (for example if 4 rows in result set only 3 are displayed)
JComboBox combo = (JComboBox)e.getSource();
                     String shopName = (String)combo.getSelectedItem();
               try {
               ResultSet eID = al.convertShopName(shopName);
                         String id2 = "";
                         while (eID.next()) {
                          id2 = eID.getObject(1).toString();
               ResultSet empNames2 = al.getAvailableNames(id2);
               if (!empNames2.next()) { //This is used to show error message
                    JOptionPane.showMessageDialog(null, "There are no available employees within the selected shop", "Error Message",
                                       JOptionPane.ERROR_MESSAGE);
               else {
                       model.addData(empNames2);
                    table = new JTable(model);
                       for(int i = 0; i < column_count; i++) {          
                            table.getColumnModel().getColumn (i).setPreferredWidth (200);                   
               catch (SQLException sql2) {
                    System.out.println("Failed while re-populating JTable with your staff");
//PROBLEM TWO: In this option i have out the error message code and tried to change it but now all the correct employees are displayed for every shop but an error message it is not displayed:
JComboBox combo = (JComboBox)e.getSource();
                     String shopName = (String)combo.getSelectedItem();
               try {
               ResultSet eID = al.convertShopName(shopName);
                         String id2 = "";
                         while (eID.next()) {
                          id2 = eID.getObject(1).toString();
               ResultSet empNames2 = al.getAvailableNames(id2);
               if (empNames2 == null) {//Changed it to this but DOESNT WORK
                    JOptionPane.showMessageDialog(null, "There are no available employees within the selected shop", "Error Message",
                                       JOptionPane.ERROR_MESSAGE);
               else {
                       model.addData(empNames2);
                    table = new JTable(model);
                       for(int i = 0; i < column_count; i++) {          
                            table.getColumnModel().getColumn (i).setPreferredWidth (200);                   
               catch (SQLException sql2) {
                    System.out.println("Failed while re-populating JTable with your staff");
Can anyone help where by i can show all employees and also the error message
Thanks in advance                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

JComboBox combo = (JComboBox)e.getSource();
String shopName =
tring shopName = (String)combo.getSelectedItem();
               try {
               ResultSet eID = al.convertShopName(shopName);
          String id2 = "";
          while (eID.next()) {
          id2 = eID.getObject(1).toString();
          }The above sets id2 to the first column from the last row. That's all it does. If you have 100 rows, the first 99 will be skipped. Is that what you want?
>                   
               ResultSet empNames2 = al.getAvailableNames(id2);
if (!empNames2.next()) { //This is used to show
ow error message
JOptionPane.showMessageDialog(null, "There are no no available employees within the selected shop",
"Error Message",
                              JOptionPane.ERROR_MESSAGE);
               else {
               model.addData(empNames2);
                    table = new JTable(model); Okay, I assume addData does rs.next() and extracts from the ResultSet. But look, in the "if", you're doing rs.next() once. If the first thing you do inside of addData, then you call next() in the if, and then immediately call next() again, so you never do anything with the first one.
A couple of possibile solutions:
* inside addData, do the gets first, and the next() at the end of the loop. You'll probably have to adjust your loop termination test.
* Don't check first, just call addData, and have it return the number of rows added, or a boolean for whether it added any, use that result to decide whether to throw the exception.

Similar Messages

  • Probably a Simple Alignment Problem

    Ok this one is really bugging me. I'm using a BoxLayout and I want the items to align on the left edge rather than in the middle. I read through the tutorial for this exact thing, I've consulted several examples doing this exact thing, but it doesn't work for me. Maybe I've been looking at this code too long to spot the error and someone here can point me in the right direction.
    I read that OBJECT.setAlignmentX(LEFT_ALIGNMENT) or OBJECT.setAlignmentX(Component.LEFT_ALIGNMENT) should set the objects alignment property and that BoxLayout should respect that and position it properly. I don't know why there are 2 methods, I assume that LEFT_ALIGNMENT and Component.LEFT_ALIGNMENT are actually the same reference to a "0" alignment value? Anyway, I found both of these listed as the solution to this problem, but neither seem to work in my program. I even tried sticking "0" in for the reference and I get the same error when I compile:
    PhoneDatabase.java:217: <identifier> expected
         lblMaker.setAlignmentX(Component.LEFT_ALIGNMENT);
                                      ^So what is this identifier that it wants and why does this exact code compile quietly in other programs?

         lblMaker.setAlignmentX(0.0f);Gives me the same error, <identifier> expected, pointing at the 0.0f.
    I tried importing Component and even awt.* and still no luck. Correct me if I'm wrong, but since the JLabel descends from Component shouldn't it automatically have access to the setAlignmentX method?
    Everything in this panel should be left aligned so the problem Michael Dunn mentioned shouldn't be an issue.
    Message was edited by:
    michael.payne

  • Probably a simple SQL Query - Newbie

    I want to select entries from a table that has 2 columns where the first column value is contained within the 2 column....Does that make sense?
    The first is a varchar that contains a value for a customer. The second is a varchar that contains a a textual description of a problem the customer has. My problem is that I only want to select the entries in the table where the second column contains a description that includes the first column value.
    eg. I want to select rows that have the following condition:
    column1 has value of "customer1"
    column2 has a value of "an error was reported by customer1 on service blah"
    but not these
    column1 has value of "customer1"
    column2 has a value of "an error was reported by customer2 on service blah"
    This is probably a simple question but I've spent time looking at how to do it and can't seem to manage...any help would be appreciated....Thanks

    Hi Barbara,
    I've never used the CONTAINS operator before. I compared the use in this situation to the other methods and found the others to be FAR less resource intensive, despite working on unindexed columns, as I demonstrate below.
    It would seem that CONTAINS is unsuited to this type of simple query. Can you shed any light on this, from the perspective of somebody who has used it before? Is this type of performance penalty normal? If so, it could seem that CONTAINS is fairly useless next to LIKE.
    [email protected]> desc test;
    Name                                        Null?    Type
    COLUMN1                                              VARCHAR2(20)
    COLUMN2                                              VARCHAR2(100)
    [email protected]> select count(*) from test;
      COUNT(*)
         10000
    Elapsed: 00:00:00.00
    [email protected]> select * from test where instr(column2, column1) > 0;
    10000 rows selected.
    Elapsed: 00:00:00.18
    Execution Plan
       0      SELECT STATEMENT Optimizer=ALL_ROWS (Cost=23 Card=8328 Bytes=532992)
       1    0   TABLE ACCESS (FULL) OF 'TEST' (TABLE) (Cost=23 Card=8328 Bytes=532992)
    Statistics
              5  recursive calls
              0  db block gets
            821  consistent gets
              0  physical reads
              0  redo size
         702263  bytes sent via SQL*Net to client
           7838  bytes received via SQL*Net from client
            668  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
          10000  rows processed
    [email protected]> select * from test where column2 like '%'||column1||'%';
    10000 rows selected.
    Elapsed: 00:00:00.18
    Execution Plan
       0      SELECT STATEMENT Optimizer=ALL_ROWS (Cost=23 Card=8328 Bytes=532992)
       1    0   TABLE ACCESS (FULL) OF 'TEST' (TABLE) (Cost=23 Card=8328 Bytes=532992)
    Statistics
              5  recursive calls
              0  db block gets
            821  consistent gets
              0  physical reads
              0  redo size
         702263  bytes sent via SQL*Net to client
           7838  bytes received via SQL*Net from client
            668  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
          10000  rows processed
    [email protected]> create index testidx on test(column2) indextype is ctxsys.context;
    Index created.
    [email protected]> select * from test where contains(column2, column1) > 0;
    10000 rows selected.
    Elapsed: 00:00:56.80
    Execution Plan
       0      SELECT STATEMENT Optimizer=ALL_ROWS (Cost=25008 Card=4 Bytes=284)
       1    0   TABLE ACCESS (FULL) OF 'TEST' (TABLE) (Cost=25008 Card=4 Bytes=284)
    Statistics
          55201  recursive calls
              0  db block gets
          85857  consistent gets
              0  physical reads
              0  redo size
         702263  bytes sent via SQL*Net to client
           7838  bytes received via SQL*Net from client
            668  SQL*Net roundtrips to/from client
            204  sorts (memory)
              0  sorts (disk)
          10000  rows processedThanks in advance,
    Anthony

  • Real simple xslt problem/question

    Hi, i have a real simple xslt problem but i just cant figure out how to do it by looking at various examples on the net. i have a xml document and in it are some elements with a "result" tag name. i want to use xslt to reproduce exactly the same xml document except with an attribute called "id" added to those elements with a "result" tag name. i'm sure that theres a simple solution to it but i just cant figure it out. any helps greatly appreciated, thanks

    Start with the XSLT identity transform (I don't have it handy and it's fairly long, but you should be able to google it up). Add this:<xsl:template match="result">
      <result id="">
        <xsl:apply-templates>
      </result>
    </xsl:template>

  • JDeveloper IDE simple setting problem

    Hi,
    Recently we switched to JDeveloper from Visual Cafe .I have a simple setting problem.How can I set the options so that IDE gives, the core java classes and packages,and our application classes and packeges, prompts in imports as well as in code.Where to set the options.
    eg: when I write
    import java. it should prompt all the pakages.
    Thanks in advance.
    -Gopal
    null

    I am not sure I understand what you are requesting, but ...
    You can configure JDeveloper projects to include various libraries by default.
    This is done by selecting menu Tools | Default Project Properties.../ Libraries tab.
    You should define a library for your classes.
    You can import any of the packages / classes from all the libraries which your project includes.
    It would be incorrect for a tool to automatically add a bunch of import lines at the top of every file because each file should import what it needs and just as importantly, not import what it does not need depending on the component type (e.g. a servlet should not include javax.swing.* ).
    An easy way to import elements into JDeveloper is to type in something like:
    import java.
    // and then type in Ctrl Space
    and this launches the package browser, you can select packages or classes to import.
    You can also do this at the variable declaratiton point such as typing in:
    foo() {
    Frame x
    // Press Control Alt Space
    and this will correctly change the type (Frame) to the type you select in the package browser and add the import statement.
    -John
    null

  • Probably incredibly simple question, so sorry. I have just changed e-mail after many many years and I want to e-mail everyone in my mac mail client with the new e-mail address at the same time.

    Probably incredibly simple question, so sorry. I have just changed e-mail after many many years and I want to e-mail everyone in my mac mail client with the new e-mail address at the same time.

    If you are using Address Book, open it, create a new Group, select all you contacts by click the top one while holding down the shift key and then select the last one. Drag the contacts to the group, then send an e-mail to the group.

  • Probably super simple...ACL/VLANs

    I have a VLAN 6 that is dedicated to a Partner organization (they share our bandwidth and schedule conference rooms with our Exchange).
    Question is how do I configure ACLs to direct ALL traffic to and from Partner, exception of accessing our Outlook Web Access and DNS servers in VLAN 1, and our websites in VLAN 2 ?
    This is probably super simple but I keep ending up with traffic going where I don't want it to.  Thanks so much...
    (And if anything else seems wacky about this setup, blame the last IT guy)

    What is the platform you are using??? ASA, router??
    Thanks,
    Varun Rao
    Security Team,
    Cisco TAC

  • Simple OOP Problem. Help!

    This is just a simple OOP problem that i cant decide on a best
    implementation for.
    im passing an object to an instance of, 'TabbedFrame', which is just
    a frame with a Tabbed Pane in it that is holding custom panels.
    however, these custom panels need access to the object being
    passed to 'TabbedFrame' and to some methods in it.
    i cant make them static however so how do i gain access to them?
    is my only option to pass the 'TabbedFrame' to each panel?
    like - jtabbedpane.add( "Panel 1", new mypanel1(this));
    here is code:
    new TabbedFrame( DataObject );
    public class TabbedFrame{
    public TabbedFrame(DataObject do){
    this.do = do;
    jtabbedpane.add( "Panel 1", new mypanel1() );
    DataObject do;
    public class mypanel1{
    public mypanel1(){
    // need access to DataObject of the 'TabbedFrame' object that instantiated
    // this 'mypanel1' and to some of its methods
    }i would just pass the DataObject to evey panel (there are 12) but
    i also need to be able to call methods in the 'TabbedFrame'.
    Any help would be appreciated!

    Modify mypanel1's constructor:
    public class mypanel1{
    TabbedFrame tf;
    public mypanel1(TabbedFrame tf){
    this.tf = tf;
    // need access to DataObject of the 'TabbedFrame' object that instantiated
    // this 'mypanel1' and to some of its methods
    DataObject theDo = tf.getDataObject();
    tf.someMethod(); // Call method on the TabbedFrame
    }In TabbedFrame:
    public TabbedFrame(DataObject do){
    this.do = do;
    // Modify call to constructor to pass "this" TabbedFrame.
    jtabbedpane.add( "Panel 1", new mypanel1(this) );
    }

  • Probably a simple fix ...

    why doesnt my page look the same in the browser as it does in dreamweaver?
    < what it looks like in dreamweaver ... perfect
    < what it looks like in my browser ... all spread out and messed up
    there is probably something simple i am doing or not doing but i cannot figure it out hopefully someone can help me out
    thank you so so so so much!
    here is this page's code if needed:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Designs by Christina Mae  |  School { print }</title>
    <script type="text/javascript">
    <!--
    function MM_swapImgRestore() { //v3.0
      var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
    function MM_preloadImages() { //v3.0
      var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
        var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
        if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
    function MM_findObj(n, d) { //v4.01
      var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
        d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
      if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
      for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
      if(!x && d.getElementById) x=d.getElementById(n); return x;
    function MM_swapImage() { //v3.0
      var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
       if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
    //-->
    </script>
    <style type="text/css">
    <!--
    body,td,th {
    color: #A78462;
    body {
    background-image: url(../webimages/background.gif);
    background-repeat: repeat;
    float: inherit;
    -->
    </style></head>
    <body onload="MM_preloadImages('slices/school-motion/motion_rollover_09.gif','../slices/school- print/print_rollover_04.gif','../slices/school-print/print_rollover_06.gif','../slices/sch ool-print/print_rollover_10.gif','../slices/school-print/print_rollover_09.gif')">
    <table width="1024" height="384" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td width="221"><table width="221" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="221"><img src="../slices/school-print/print_01.gif" width="221" height="73" /></td>
          </tr>
          <tr>
            <td><img src="../slices/school-print/print_03.gif" width="221" height="71" /></td>
          </tr>
          <tr>
            <td><a href="../web&amp;motion/DESIGNS_motionweb.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image8','','../slices/school-print/print_rollover_04.gif',1)"> <img src="../slices/school-print/print_04.gif" name="Image8" width="221" height="18" border="0" id="Image8" /></a></td>
          </tr>
          <tr>
            <td><img src="../slices/school-print/print_05.gif" width="221" height="33" /></td>
          </tr>
          <tr>
            <td><a href="../freelance/DESIGNS_freelance.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image11','','../slices/school-print/print_rollover_06.gif',1)" ><img src="../slices/school-print/print_06.gif" name="Image11" width="221" height="21" border="0" id="Image11" /></a></td>
          </tr>
          <tr>
            <td><img src="../slices/school-print/print_07.gif" width="221" height="552" border="0" usemap="#Map3" /></td>
          </tr>
        </table></td>
        <td width="803"><table border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td height="655" nowrap="nowrap" bgcolor="#F9F3DE"><script type="text/javascript" src="swfobject.js"></script>
    <div id="flashcontent">SimpleViewer requires JavaScript and the Flash Player.
    <a href="http://www.macromedia.com/go/getflashplayer/">Get Flash.</a></div>
    <script type="text/javascript">
    var fo = new SWFObject("viewer.swf", "viewer", "800", "600", "8", "#f8f0dd");
    fo.write("flashcontent");
    </script></td>
          </tr>
          <tr>
            <td nowrap="nowrap"><table width="605" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="553"><p><img src="../slices/school-print/print_08.gif" width="591" height="113" /></p></td>
                <td width="52"><table border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="42"><p><a href="../resume.pdf" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image13','','../slices/school-print/print_rollover_09.gif',1)" ><img src="../slices/school-print/print_09.gif" name="Image13" width="212" height="23" border="0" id="Image13" /></a></p>
                      </td>
                  </tr>
                  <tr>
                    <td><p><a href="mailto:[email protected]" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image12','','../slices/school-print/print_rollover_10.gif',1)" ><img src="../slices/school-print/print_10.gif" name="Image12" width="212" height="22" border="0" id="Image12" /></a></p>
                      </td>
                  </tr>
                  <tr>
                    <td><p><img src="../slices/school-print/print_11.gif" width="212" height="68" /></p>
                      </td>
                  </tr>
                </table></td>
              </tr>
            </table></td>
          </tr>
        </table></td>
      </tr>
    </table>
    <div align="center"></div>
    <map name="Map" id="Map"><area shape="circle" coords="114,449,42" href="DESIGNS_home.html" />
    </map>
    <map name="Map2" id="Map2"><area shape="circle" coords="112,447,40" href="DESIGNS_home.html" />
    </map>
    <map name="Map3" id="Map3"><area shape="circle" coords="114,445,43" href="../DESIGNS_home.html" />
    </map></body>
    </html>

    It's always nicer to see the live page on remote server so we can see the images and everything in context.
    Try changing this:
    body {
    background-image: url(../webimages/background.gif);
    background-repeat: repeat;
    float: inherit;
    to this:
    body {
    background: url(../webimages/background.gif) repeat;
    Also,  remove the height="value"  from your tables.  It's not valid code.
    HTML Validator - http://validator.w3.org 
    CSS Validator - http://jigsaw.w3.org/css-validator/  
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    www.alt-web.com/
    www.twitter.com/altweb
    www.alt-web.blogspot.com

  • Probably a simple solution, but . . .

    Hi there - There is probably a simple fix to this - and it probably doesn't even matter, but I'm curious. When I attach an exported file to an email, it is attaching as a picture of the document, rather than as an icon with the document's name. The thing is, it used to attach as the icon and not the actual document. I know it probably doesn't matter, but I liked it better when attaching the icon representing the doc. I've probably hit a button or flipped a switch I didn't know I hit or flipped, but where is it and how can I reset it? Thanks a lot!
    Craig

    Craig,
    I may not have understood the original question. The comment and action James has posted would relate to whether a file would View in Place as you compose -- it does not impact what is sent.
    However, I thought you were describing the file Icon as having a Preview or Thumbnail, and not a full View in Place? If a file has a photo-like thumbnail, it is the result of the saving of the file, and not something in Mail.
    Please clarify?
    Ernie

  • Probably a simple solution to tweak a particle preset, please help

    I am doing an effect for a friends video where a UFO is hanging in the air. I have tweaked the look of the 'Pulsing Laser Star' to what I want, however, the camera pans from the actors face to the light. I can't figure out how to already have it there. it's always births from nothing. I have tried setting the birthrate to 0 and the initial number up but that doesn't do it. I haven't used Motion all that much but I liked the look of this particle. Probably something simple. Can anyone offer any advice?

    You mean you need a particle emiter to just stand still?
    http://www.applemotion.net/blog/2011/5/2/motion-on-macbreak-studio-3d-particle-t ricks.html

  • ORA-06512 and/or ORA-00936 ... simple procedure problem probably

    I'm passing in codes like the following to the stored procedure (below):
    ",IRE,UK,FR,SCOT,WALES" (a string of words seperated by a ',')
    Problem is I get the following error:
    ORA-00936: missing expression ORA-06512: at "APPNAME.PKG_TOOL", line 132 ORA-06512: at line 1
    I googled the two ORA's but am still stumped. I'd appreciate any help at all as I'm still not overly familiar with SQL.
    PROCEDURE sp_check_code_Exist(p_CodeList IN varchar, p_cursorSMB IN OUT cursorSMB) IS
         thissql varchar(1000);
         BEGIN
              thissql := thissql || 'select * from codes_data c where ';
              thissql := thissql || 'c.code in ('|| p_CodeList ||') ';
              open p_cursor FOR thissql;
              begin
                     Execute immediate thissql;
              end;
         END sp_check_code_Exist;

    I know this is digressing a bit from the thread heading but I'd like to know if I really will be screwed if I don't optimise.
    The machine that this is being hosted on will be a top notch machine with a very fat line and will have probably only thousands of codes.
    This is the code as it stands now
    PROCEDURE sp_check_GenericCodes(p_GenericsList IN varchar, p_cursorSMB IN OUT cursorSMB) IS
         thissql varchar(1000);
         BEGIN
              thissql := thissql || 'select distinct generic_code from emc_codes_data ed where ';
              thissql := thissql || 'ed.generic_code in ('||p_GenericsList||')';
              open p_cursorSMB FOR thissql;
         END sp_check_GenericCodes;So all I'll be returning is a few thousand words which will then be sorted alphabetically and will be then compared to another string which will be sorted alphabetically, to see if there is any missing code, and if there are then those codes will be spit out to an admin who will realise he made a mistake and where the mistake is.
    This is how its all called:
    public string checkGenericCodesExist(string codesList)
                   OracleDataReader rdr = null;
                   DBConnect dbConnLocal = null;
                   OracleCommand cmd = null;
                   string sRetVal = null;
                   string CurrentFunction = "PPTEngine.clsPart.genericCodeExsists";               
                   try
                        dbConnLocal = new DBConnect(CurrentFunction, "Pkg_SMBTool.sp_check_GenericCodes", m_Stream);
                        // Pass in parameters
                        dbConnLocal.addParam(new OracleParameter("p_cursorSMB", OracleType.Cursor));                    
                        dbConnLocal.setParamDirection("p_cursorSMB",ParameterDirection.Output);
                        dbConnLocal.addParam(new OracleParameter("p_GenericsList", OracleType.VarChar));
                        dbConnLocal.setParamValue("p_GenericsList", codesList);                    
                        // Execute
                        cmd = dbConnLocal.ExecuteProcedure();
                        rdr = (OracleDataReader)cmd.Parameters["p_cursorSMB"].Value;
                        // Loop
                        if (rdr.HasRows)
                             while (rdr.Read())
                                  if (!rdr.IsDBNull(rdr.GetOrdinal("Generic_Code"))) m_GenericCode = rdr.GetString(rdr.GetOrdinal("Generic_Code"));
                        rdr.Close();
                        //remove the '
                        string[] PPTCodes = codesList.Replace( "'", null).Split("','".ToCharArray());
                   catch (Exception e)
                        Log.WriteToFile(CurrentFunction + " - " + e.Message, System.Diagnostics.TraceLevel.Error);
                        throw e;
                   finally
                        if (dbConnLocal!=null) dbConnLocal.Close();
                   return sRetVal;
              }The above function is still a work in progress, but is almost there.

  • Probably a simple answer: easy div problem

    Hello,
    I have a very easy problem but can't find the answer.  3 divs: 1 "wrapper" and 2 inside it (one left column, one right).  I want to get the CSS settings so that the left and right column are both the same length.  Right now they are on auto length and the left column is longer.  I tried to "fill out" the wrapper with the right column by setting the right column to 100% length, but now I realize the "wrapper" div is being shrink-wrapped around the shorter right column and is not stretching it.  I just want both columns to be as long as the (longer) left column.
    Thanks!

    First of all height: 100% doesn't work for divs usually. The height of the browswer window is very hard to fiigure out.
    Second: http://matthewjamestaylor.com/blog/equal-height-columns-2-column.htm
    SOmehow that layout works, and I don't qutie know how although it is a very simple layout.
    Lastly,  I'll bust out the unorthodox, loathed answer that actually is fine unless you want to worry about various screen types or browsing devices: a table.
    First, I will say that it is great that there is new CSS that allows divs to display as tables as Murray, I think, is saying. But with 10% of peple still using IE 6 and 10% using IE 7 (crazy, eh?), I don't think you can do away with support from IE 7 yet, even though we're just about up to 10 now.
    Tables are the intuitive way to solve this if you are not concerned with separating content and organization, which good modern designers are usually concerned with:
    <table class="content">
    <tr>
    <td>first column</td>
    <td>second column</td>
    </tr>
    </table>
    No fuss no muss. But if we can figure out how the two even length columns layout works above, I'd say that's the smart, modern way to deal with this.

  • Probably a simple problem.

    I left it with with them because they needed to fix a couple of things because I had problems with random shut downs and such. They told me they replaced a buncha stuff.
    Anyway, since I got it back, when I go onto my desktop and click on an icon it won't open. I have to go into file and open it or right click and open it. And for some reason, when I double click the top portion of a window, it doesn't minmize like it used to?
    How can I fix this?
    It's become really annoying.
    I'd appreciate some help.
    Thanks!! (;

    Okay.
    How to reset the PRAM - quoted from the KB article:
    Resetting PRAM and NVRAM
    Shut down the computer.
    Locate the following keys on the keyboard: Command, Option, P, and R. You will need to hold these keys down simultaneously in step 4.
    Turn on the computer.
    Press and hold the Command-Option-P-R keys. You must press this key combination before the gray screen appears.
    Hold the keys down until the computer restarts and you hear the startup sound for the second time.
    Release the keys.
    Repairing permissions:
    Open Finder -> Applications -> Utilities and click on Disk Utility. Click on your hard drive and then the First Aid tab (you should be there already) and then click the Repair Permissions button.
    You know how to set the System Preferences, right? Click on the Apple logo, then click on System Preferences, click on Appearance, and there's a little checkbox that says "Minimize when double-clicking a title bar." You wanna make sure that's checked.
    This should help.

  • Probably a simple problem to fix [solved]

    I am running GNOME on the latest arch 32-bit iso and for some reason I get this error every time I try to read from a cd/dvd or usb drive. any ideas?
    Cannot mount volume.
    Error org.freedesktop.DBus.Error.AccessDenied.
    A security policy in place prevents this sender from sending this message to this recipient, see message bus configuration file (rejected message had interface "org.freedesktop.Hal.Device.Volume" member "Mount" error name "(unset)" destination "org.freedesktopHal")
    Last edited by tony5429 (2007-06-09 14:46:26)

    thanks. silly me..i ran
    $gpasswd -a username storage optical
    and it didnt add me to both. i see now that it must be run as 2 separate commands. thanks everyone

Maybe you are looking for