Problem with SUBSTR

En una view, al crear un campo con SUBSTR( campo, 1, 150), devuelve un campo con tamaño de 600, el correcto seria 150, cual es la causa ?

Hi user 512674,
Please, post your questions in English. Otherwise, only Spanish-speaking people can help you (or those who can guess what the problem is ;)
SUBSTR(campo, 1, 150) means 150 characters. In an AL32UTF8 database, which you most probably have, this translates to 4*150=600 bytes. That is, the column must be able to store 600 bytes to be sure that it can store 150 AL32UTF8 character codes.
View creation does not depend on the value of the session parameter NLS_LENGTH_SEMANTICS. The view columns inherit the semantics from the underlying table columns. If <campo> column is defined with character semantics the view column will be created with character semantics: ALL_TAB_COLUMNS.DATA_LENGTH will show 600 (bytes), ALL_TAB_COLUMNS.CHAR_LENGTH will show 150 (characters), ALL_TAB_COLUMNS.CHAR_USED will show 'C'. Otherwise, the view will be created with byte semantics: ALL_TAB_COLUMNS.DATA_LENGTH will show 600 (bytes), ALL_TAB_COLUMNS.CHAR_LENGTH will show 600 (characters), ALL_TAB_COLUMNS.CHAR_USED will show 'B'.
-- Sergiusz

Similar Messages

  • Problem with substring in xsl file?

    Hallo,
    i have a xsl file, when using
    <xsl:value-of select="StsEdat"/> i've got 2007-05-21, that's o.k.
    when using <xsl:value-of select="substring(StsEdat,9,2)"/> the answer is blank.
    also 0,5 or so on. substring at this position delivers blank. why?
    what can it be? i'am helpless.
    any help is appreciated.

    Hi,
    I used <xsl:value-of select="substring(StartDate,9,2)"/> the answer was 21 and to 0,5 the answer was 2007. It seems that's ok!
    Try to do it and see if you have problem with substring.
    <xsl:variable name="StsEdat">2007-05-21</xsl:variable>
    <xsl:value-of select="substring($StsEdat,9,2)"/>
    or this weird way, :)
    <xsl:variable name="StsEdat">2007-05-21</xsl:variable>
    <xsl:value-of select='substring-after(substring-after($StsEdat, "-"), "-")' />
    Regards,
    Cleiton

  • Problem with SUBSTR and GROUP BY

    Hi people...
    I'm needing a little help with this case. I'm executing this SQL and got error ORA-01722. I've tried to use number columns, alias and the syntax below and always got error. My problem is the SUBSTR, without it I can run the SQL with no error.
    SQL> ED
    Gravou arquivo afiedt.buf
    1 SELECT TO_CHAR(DATA,'DD/MM') AS DATA,
    2 SUBSTR(TO_CHAR(DATA,'DAY'),1,3) AS DIA_SEM,
    3 SUM(DECODE(TIPOBAIXA,1,1,0)) AS INST,
    4 SUM(DECODE(TIPOBAIXA,1,0,1)) AS REM,
    5 SUM(DECODE(TIPOBAIXA,1,1,0))-SUM(DECODE(TIPOBAIXA,1,0,1)) AS DIFF
    6 FROM BAIXA
    7 GROUP BY TO_CHAR(DATA,'DD/MM'), TO_CHAR(DATA,'DAY')
    8* ORDER BY TO_CHAR(DATA,'DD/MM') DESC
    SQL> /
    GROUP BY TO_CHAR(DATA,'DD/MM'), TO_CHAR(DATA,'DAY')
    ERRO na linha 7:
    ORA-01722: invalid number
    Somebody has an idea of how I can solve this?
    Thanks,
    Fabiano

    SQL> create table baixa
      2  as
      3  select sysdate data, 1 tipobaixa from dual union all
      4  select sysdate - 1, 0 from dual union all
      5  select sysdate - 2, 1 from dual
      6  /
    Tabel is aangemaakt.
    SQL> SELECT TO_CHAR(DATA,'DD/MM') AS DATA
      2       , TO_CHAR(DATA,'DY') AS DIA_SEM
      3       , SUM(DECODE(TIPOBAIXA,1,1,0)) AS INST
      4       , SUM(DECODE(TIPOBAIXA,1,0,1)) AS REM
      5       , SUM(DECODE(TIPOBAIXA,1,1,0))-SUM(DECODE(TIPOBAIXA,1,0,1)) AS DIFF
      6    FROM BAIXA
      7   GROUP BY TO_CHAR(DATA,'DD/MM'), TO_CHAR(DATA,'DY')
      8   ORDER BY TO_CHAR(DATA,'DD/MM') DESC
      9  /
    GROUP BY TO_CHAR(DATA,'DD/MM'), TO_CHAR(DATA,'DY')
    FOUT in regel 7:
    .ORA-01722: invalid number
    SQL> select to_char(data,'dd/mm') as data
      2       , to_char(data,'DY') as dia_sem
      3       , sum(decode(tipobaixa,1,1,0)) as inst
      4       , sum(decode(tipobaixa,1,0,1)) as rem
      5       , sum(decode(tipobaixa,1,1,0))-sum(decode(tipobaixa,1,0,1)) as diff
      6    from baixa
      7   group by to_char(data,'dd/mm')
      8       , to_char(data,'DY')
      9   order by 1 desc
    10  /
    DATA  DI                                   INST                                    REM                           DIFF
    05/01 VR                                      1                                      0                              1
    04/01 DO                                      0                                      1                             -1
    03/01 WO                                      1                                      0                              1
    3 rijen zijn geselecteerd.Regards,
    Rob.

  • Problem with Substring

    Here's my code..
    String Varble = rs0.getString("adddate").substring(0,10);
    out.println("<td>" + stmt + "</td>");
    I've also tried this (which is the same thing just more code) Now it DOES work if I make tinydate text.
    String tinydate = rs0.getString("adddate")
    String Varble = tinydate.substring(0,10);
    out.println("<td>" + stmt + "</td>");
    Here's the Error. What am I doing wrong?
    javax.servlet.ServletException: Error: Browse.jsp - select adddate from K9Manager WHERE adddate is not NULL failed.java.sql.SQLException: [TDS Driver]No current row[TDS Driver]No current row
         

    Hard to tell what you are doing wrong, but it is nothing to do with the substring method. The message "No current row" suggests to me that you haven't called rs0.next() to move to the first row of the result set, but the error message displays your SQL, which I find strange. But maybe that's just how your JDBC driver does things.

  • Problem with substring or println

    Hi,
    I have the following code, and it basically is looking for text between <title></title> tags. I use substring to grab the code between the two tags, and debugging shows it is correct. However, when I output it, my code stops and I just have whitespace.
    Any suggestions?
    while(((str = in.readLine()) != null) && (found == false))
         if(str.indexOf("<title>") != -1) // Title exists
              found = true;
              int titlestart=0;
              int titleend=0;
              titlestart = str.indexOf("<title>");
              titleend = str.indexOf("</title>");           
              title=str.substring(titlestart,titleend);
              out.println("Found:" + title +" Start index at:" + titlestart + " End at:"+titleend );
    }

    The code below works for
    1. <title>foo<title>
    2. <title>
    foo
    </title>
    3. <title>foo
    bar</title>
    Use it if it helps...
                StringBuffer title = new StringBuffer(); 
                while (((str = in.readLine()) != null) && found == false)
                    // start reading
                    if (str.indexOf("<title>") != -1) // Title exists
                        boolean singleLine = false;                   
                        found = true;
                        if (str.indexOf("</title>") == -1)
                            //data between title tags span multilines.
                            //And yet there may be some data on this line eg, <title>foo...
                            title.append(str.substring(str.indexOf("<title>") + 7, str.length()));                       
                        else
                            //tag starts and ends in a single line
                            title.append(str.substring(str.indexOf("<title>") + 7, str.indexOf("</title")));
                            singleLine = true;
                        if(!singleLine)
                            do
                                str = in.readLine();
                                if (str.indexOf("</title>") == -1)
                                    //if the tag doesnt end, keep on reading
                                    title.append(str);
                                else
                                    //if the tag ends on this line, egt all data that may be present before tag end
                                    //eg ...bar</title>
                                    title.append(str.substring(0, str.indexOf("</title>")));
                            while (str != null && str.indexOf("</title>") == -1);
                out.println(title);ram.

  • Problem with threads hanging

    We have a problem where our application stops responding after a few days of usage. Things will for fine for a day or two, and then pretty quickly threads will start getting hung up, usually in places where they are allocating memory
    We are running WebLogic 8.1 SP2 on Sun JDK 1.4.2_04 on Solaris 8 using the alternate threading model and the -server hotspot vm. We are running pretty much the same code that we had no problems with under WebLogic 6.1 SP4 and Sun JDK 1.3.1.
    A thread dump usually shows that some or all of our execute threads are in the state "waiting for monitor entry" even though they are not currently waiting on any java locks. Here is a sample thread from the thread dump (we have ~120 threads so I don't want to post the full dump).
    =============================================================================================
    "ExecuteThread: '8' for queue: 'itgCrmWarExecutionQueue'" daemon prio=5 tid=0x005941d0 nid=0x2c waiting for monitor entry [c807f000..c807fc28]
    at java.lang.String.substring(String.java:1446)
    at java.lang.String.substring(String.java:1411)
    at weblogic.servlet.internal.ServletRequestImpl.getRelativeUri(ServletRequestImpl.java:1872)
    at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3492)
    at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2585)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
    =============================================================================================
    String.java line 1446 for this jdk allocates a new String object, and all the other threads in this state also are creating new objects or arrays, etc.
    We've done a pstack on this process when it's in this state, and the threads that are in the "waiting for monitor entry" that look like they're allocating memory are all waiting on the same lwp_mutex_lock with some allocation method that's calling into the native TwoGenerationCollectorPolicy.mem_allocate_work (see pstack output below for the same thread as in the thread dump above)
    =============================================================================================
    ----------------- lwp# 44 / thread# 44 --------------------
    ff31f364 lwp_mutex_lock (e3d70)
    fee92384 __1cNObjectMonitorGenter26MpnGThread__v_ (5000, 525c, 5000, 50dc, 4800, 4af0) + 2d8
    fee324d4 __1cSObjectSynchronizerKfast_enter6FnGHandle_pnJBasicLock_pnGThread__v_ (c807f65c, c807f7d4, 5941d0, 0, 35d654, fee328ec) + 68
    fee32954 __1cQinstanceRefKlassZacquire_pending_list_lock6FpnJBasicLock__v_ (c807f7d4, ff170000, d4680000, 4491d4, fee1bc2c,
    0) + 78
    fee3167c __1cPVM_GC_OperationNdoit_prologue6M_i_ (c807f7bc, 4400, ff170000, 2d2b8, 4a6268, c807fa18) + 38
    fee2e0b0 __1cIVMThreadHexecute6FpnMVM_Operation__v_ (c807f7bc, 963a8, 0, 0, 1, 0) + 90
    fed2c2a4 __1cbCTwoGenerationCollectorPolicyRmem_allocate_work6MIii_pnIHeapWord__ (962c0, ff1c29ec, ff1c297c, ff131a26, 4800, 4998) + 160
    fed22940 __1cNinstanceKlassRallocate_instance6MpnGThread__pnPinstanceOopDesc__ (ee009020, 5941d0, 15ca581, 3647f0, 4a6268, c807f8c8) + 180
    fed34928 __1cLOptoRuntimeFnew_C6FpnMklassOopDesc_pnKJavaThread__v_ (ee009018, 5941d0, 0, 0, 0, 0) + 28
    fa435a58 ???????? (ee009018, e86de, 15ca4de, 50dc, 5941d0, c807f9c8)
    fb36f9a4 ???????? (0, d412ccd8, ee046c28, ff170000, 0, 0)
    fad8b278 ???????? (ee046c28, d6000c90, ee046530, 8, db8e8450, c807f9e8)
    fad62abc ???????? (d412ccd8, ee046530, d6000c90, ee3bfa38, 8, c807fa18)
    fa4b3c38 ???????? (c807fb9c, 0, f2134700, fa415e50, 8, c807faa8)
    fa40010c ???????? (c807fc28, c807fe90, a, ee9e1e20, 4, c807fb40)
    fed5d48c __1cJJavaCallsLcall_helper6FpnJJavaValue_pnMmethodHandle_pnRJavaCallArguments_pnGThread__v_ (c807fe88, c807fcf0, c807fda8, 5941d0, 5941d0, c807fd00) + 27c
    fee4b784 __1cJJavaCallsMcall_virtual6FpnJJavaValue_nLKlassHandle_nMsymbolHandle_4pnRJavaCallArguments_pnGThread__v_ (ff170000, 594778, c807fd9c, c807fd98, c807fda8, 5941d0) + 164
    fee5e8dc __1cJJavaCallsMcall_virtual6FpnJJavaValue_nGHandle_nLKlassHandle_nMsymbolHandle_5pnGThread__v_ (c807fe88, c807fe84, c807fe7c, c807fe74, c807fe6c, 5941d0) + 6c
    fee6fc74 __1cMthread_entry6FpnKJavaThread_pnGThread__v_ (5941d0, 5941d0, 838588, 594778, 306d10, fee69254) + 128
    fee6927c __1cKJavaThreadDrun6M_v_ (5941d0, 2c, 40, 0, 40, 0) + 284
    fee6575c _start   (5941d0, fa1a1600, 0, 0, 0, 0) + 134
    ff3758c0 lwpstart (0, 0, 0, 0, 0, 0)
    =============================================================================================
    Also when it's having this problem, the "VM Thread" is always using a lot of processor time. We did a couple of pstacks today while it was having this problem, and this thread was stuck in the ONMethodSweeper.sweep for over 15 minutes when we finally killed the server.
    From the thread dump:
    "VM Thread" prio=5 tid=0x000e2d20 nid=0x2 runnable
    From the first pstack:
    =============================================================================================
    ----------------- lwp# 2 / thread# 2 --------------------
    fed40c04 __1cXvirtual_call_RelocationIparse_ic6FrpnICodeBlob_rpC5rppnHoopDesc_pi_nNRelocIterator__ (42a2f4, fa5fa46d, ffffffff, fc4ffcb8, 42a2f4, 42a324) + 124
    fed46318 __1cKCompiledIC2t5B6MpnKRelocation__v_ (42a2f0, fc4ffd24, fc4ffd4c, e802, 0, 6) + 38
    fed90c38 __1cHnmethodVcleanup_inline_caches6M_v_ (fa5f7f88, fa608940, 1, 0, fa400000, 6) + 1ac
    fede18b4 __1cONMethodSweeperFsweep6F_v_ (2cf38, 0, ffffffff, ff1cf1fc, ff1c66e8, fede1d44) + 1b0
    fede1e6c __1cUSafepointSynchronizeFbegin6F_v_ (2cf38, ff1ba138, 5000, 50dc, 5000, 525c) + 248
    feef1fd4 __1cIVMThreadEloop6M_v_ (4400, 4000, 4324, 4000, 42b0, 3800) + 3d4
    feef1ae4 __1cIVMThreadDrun6M_v_ (e2d20, 2, 40, 0, 40, 0) + 8c
    fee6575c _start   (e2d20, ff270200, 0, 0, 0, 0) + 134
    ff3758c0 lwpstart (0, 0, 0, 0, 0, 0)
    =============================================================================================
    Second pstack
    =============================================================================================
    ----------------- lwp# 2 / thread# 2 --------------------
    fed41180 __1cXvirtual_call_RelocationIparse_ic6FrpnICodeBlob_rpC5rppnHoopDesc_pi_nNRelocIterator__ (0, ff1b9664, ffffffff, fc4ffcb8, a6f2cc, fc4ffbd0) + 6a0
    fed46318 __1cKCompiledIC2t5B6MpnKRelocation__v_ (a6f2c8, fc4ffd24, fc4ffd4c, e802, 0, 6) + 38
    fed90c38 __1cHnmethodVcleanup_inline_caches6M_v_ (faded4c8, fadf2c80, 1, 0, fa400000, 6) + 1ac
    fede18b4 __1cONMethodSweeperFsweep6F_v_ (2cf38, 0, ffffffff, ff1cf1fc, ff1c66e8, fede1d44) + 1b0
    fede1e6c __1cUSafepointSynchronizeFbegin6F_v_ (2cf38, ff1ba138, 5000, 50dc, 5000, 525c) + 248
    feef1fd4 __1cIVMThreadEloop6M_v_ (4400, 4000, 4324, 4000, 42b0, 3800) + 3d4
    feef1ae4 __1cIVMThreadDrun6M_v_ (e2d20, 2, 40, 0, 40, 0) + 8c
    fee6575c _start   (e2d20, ff270200, 0, 0, 0, 0) + 134
    ff3758c0 lwpstart (0, 0, 0, 0, 0, 0)
    =============================================================================================
    Has anyone ever seen anything like this? I'm trying to figure out if this is caused by something we're doing, or something relating to our environment and jvm options. Any ideas?

    Thanks for the reply - I'm testing our app with the +UseConcMarkSweepGC now in our test environment to make sure it doesn't cause any problems there.  Unfortunately the only place we've had this problem is on the production server, so it's extra difficult debugging this. 
    We're using the following memory options:
    -ms512m -mx512m -XX:NewSize=128m -XX:PermSize=192m -XX:MaxNewSize=128m -XX:MaxPermSize=192m -XX:SurvivorRatio=8and the following debugging options, as we've also been seeing OutOfMemoryErrors ( see http://forum.java.sun.com/thread.jsp?forum=37&thread=522354&tstart=45&trange=15 )
    -verbosegc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintHeapAtGCBTW, which c++filt version and options are you using? Our Solaris boxes only seem to have the GNU version installed. I was trying to run that on some of the other stack traces and wasn't getting anywhere, and didn't know if because it was GNU version wouldn't work on something compiled with the Sun compiler.
    Thanks!
    --Andy                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Help with add file name problem with Photoshop CS4

    Frustrating problem: Help with add file name problem with Photoshop CS4. What happens is this. When I am in PS CS4 or CS3 and run the following script it runs fine. When I am in Bridge and go to tools/photoshop/batch and run the same script it runs until it wants interaction with preference.rulerunits. How do I get it to quit doing this so I can run in batch mode? Any help is appreciated. HLower
    Script follows:
    // this script is another variation of the script addTimeStamp.js that is installed with PS7
    //Check if a document is open
    if ( documents.length > 0 )
    var originalRulerUnits = preferences.rulerUnits;
    preferences.rulerUnits = Units.INCHES;
    try
    var docRef = activeDocument;
    // Create a text layer at the front
    var myLayerRef = docRef.artLayers.add();
    myLayerRef.kind = LayerKind.TEXT;
    myLayerRef.name = "Filename";
    var myTextRef = myLayerRef.textItem;
    //Set your parameters below this line
    //If you wish to show the file extension, change the n to y in the line below, if not use n.
    var ShowExtension = "n";
    // Insert any text to appear before the filename, such as your name and copyright info between the quotes.
    //If you do not want extra text, delete between the quotes (but leave the quotes in).
    var TextBefore = "Lower© ";
    // Insert any text to appear after the filename between the quotes.
    //If you do not want extra text, delete between the quotes (but leave the quotes in).
    var TextAfter = " ";
    // Set font size in Points
    myTextRef.size = 10;
    //Set font - use GetFontName.jsx to get exact name
    myTextRef.font = "Arial";
    //Set text colour in RGB values
    var newColor = new SolidColor();
    newColor.rgb.red = 0;
    newColor.rgb.green = 0;
    newColor.rgb.blue = 0;
    myTextRef.color = newColor;
    // Set the position of the text - percentages from left first, then from top.
    myTextRef.position = new Array( 10, 99);
    // Set the Blend Mode of the Text Layer. The name must be in CAPITALS - ie change NORMAL to DIFFERENCE.
    myLayerRef.blendMode = BlendMode.NORMAL;
    // select opacity in percentage
    myLayerRef.opacity = 100;
    // The following code strips the extension and writes tha text layer. fname = file name only
    di=(docRef.name).indexOf(".");
    fname = (docRef.name).substr(0, di);
    //use extension if set
    if ( ShowExtension == "y" )
    fname = docRef.name
    myTextRef.contents = TextBefore + " " + fname + " " + TextAfter;
    catch( e )
    // An error occurred. Restore ruler units, then propagate the error back
    // to the user
    preferences.rulerUnits = originalRulerUnits;
    throw e;
    // Everything went Ok. Restore ruler units
    preferences.rulerUnits = originalRulerUnits;
    else
    alert( "You must have a document open to add the filename!" );

    you might want to try the scripting forum howard:
    http://www.adobeforums.com/webx?13@@.ef7f2cb

  • Problem with an update page.

    I have a problem with an update page on my website
    Here's how it work
    values are defualted in from the advert table  - this works fine
    I should then be able to change the fields and click on the update button
    This works fine but ONLY when the O_year field is populated. 
    There doesn't seem to be anything special about the O_year field
    I thought spry text validation would of been causing the issues, but I removed them and have the same problem.
    For some reason the POST_MMupdate value is not being set to 'form4', which it is doing if O_year is set.
    Please can someone have a look at this, code,
    Also, is there a way of 'stepping through' dreamweaver code to debug it?
    Thanks
    Adam
    $colname_Advert = "-1";
    if (isset($_GET['advert_id'])) {
      $colname_Advert = $_GET['advert_id'];
    mysql_select_db($database_guitarswap_db, $guitarswap_db);
    $query_Advert = sprintf("SELECT * FROM advert WHERE advert_id = %s", GetSQLValueString($colname_Advert, "int"));
    $Advert = mysql_query($query_Advert, $guitarswap_db) or die(mysql_error());
    $row_Advert = mysql_fetch_assoc($Advert);
    $totalRows_Advert = mysql_num_rows($Advert);
    if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form4"))
        //Сheck that we have a file
    if((!empty($_FILES["PictureLocation"])) && ($_FILES['PictureLocation']['error'] == 0))
          //Check if the file is JPEG image and it's size is less than 350Kb
          $filename = basename($_FILES["PictureLocation"]["name"]);
          $ext = substr($filename, strrpos($filename, '.') + 1);
          if (($ext == "jpg") && ($_FILES["PictureLocation"]["type"] == "image/jpeg") &&
        ($_FILES["PictureLocation"]["size"] < 350000))
            //Determine the path to which we want to save this file
              $newname = dirname(__FILE__).'/upload/'.$filename;
              //Check if the file with the same name is already exists on the server
              if (!file_exists($newname))
                //Attempt to move the uploaded file to it's new place
                if ((move_uploaded_file($_FILES['PictureLocation']['tmp_name'],$newname)))
                       // echo "It's done! The file has been saved as: ".$newname;
                else
                       // echo "Error: A problem occurred during file upload!";
            else
                 // echo "Error: File ".$_FILES["PictureLocation"]["name"]." already exists";
          else
             // echo "Error: Only .jpg images under 350Kb are accepted for upload";
        else
         // echo "Error: No file uploaded";
        $filename=$row_Advert['PictureLocation'];
        // set default opentoalloffers
    if (!isset($_POST['checkopentoalloffers']))
        $_POST['checkopentoalloffers'] = 'n';
      $updateSQL = sprintf("UPDATE advert SET PictureLocation=%s, O_Make=%s, O_Model=%s, O_Country=%s, O_Year=%s, O_Colour=%s, O_Body=%s, O_Neck=%s, O_Fingerboard=%s, O_Pickups=%s, `value`=%s, `condition`=%s,  W_Make=%s, W_Model=%s, W_Country=%s, W_Year=%s, W_Colour=%s, W_Body=%s, W_Neck=%s, W_Fingerboard=%s, W_Pickups=%s, Comments=%s, opentoalloffers=%s, ChangeFlg = %s  WHERE advert_id=%s",
                           GetSQLValueString($filename, "text"),
                           GetSQLValueString($_POST['O_Make'], "text"),
                           GetSQLValueString($_POST['O_Model'], "text"),
                           GetSQLValueString($_POST['O_Country'], "text"),
                           GetSQLValueString($_POST['O_Year'], "date"),
                           GetSQLValueString($_POST['O_Colour'], "text"),
                           GetSQLValueString($_POST['O_Body'], "text"),
                           GetSQLValueString($_POST['O_Neck'], "text"),
                           GetSQLValueString($_POST['O_Fingerboard'], "text"),
                           GetSQLValueString($_POST['O_Pickups'], "text"),
                           GetSQLValueString($_POST['value'], "int"),
                           GetSQLValueString($_POST['condition'], "text"),
                           GetSQLValueString($_POST['W_Make'], "text"),
                           GetSQLValueString($_POST['W_Model'], "text"),
                           GetSQLValueString($_POST['W_Country'], "text"),
                           GetSQLValueString($_POST['W_Year'], "date"),
                           GetSQLValueString($_POST['W_Colour'], "text"),
                           GetSQLValueString($_POST['W_Body'], "text"),
                           GetSQLValueString($_POST['W_Neck'], "text"),
                           GetSQLValueString($_POST['W_Fingerboard'], "text"),
                           GetSQLValueString($_POST['W_Pickups'], "text"),
                           GetSQLValueString($_POST['Comments'], "text"),
                           GetSQLValueString($_POST['checkopentoalloffers'], "text"),
                           GetSQLValueString('y', "text"),
                           GetSQLValueString($_POST['advert_id'], "int"));
      mysql_select_db($database_guitarswap_db, $guitarswap_db);
      $Result1 = mysql_query($updateSQL, $guitarswap_db) or die(mysql_error());
        $updateGoTo = "Member2.php";
         if (isset($_SERVER['QUERY_STRING'])) {
           $updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?";
           $updateGoTo .= $_SERVER['QUERY_STRING'];
         header(sprintf("Location: %s", $updateGoTo));
    ?>
    <!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>Untitled Document</title>
    <link href="Layout3.css" rel="stylesheet" type="text/css" /><!--[if IE 5]>
    <style type="text/css">
    /* place css box model fixes for IE 5* in this conditional comment */
    .twoColFixLtHdr #sidebar1 { width: 230px; }
    </style>
    <![endif]--><!--[if IE]>
    <style type="text/css">
    /* place css fixes for all versions of IE in this conditional comment */
    .twoColFixLtHdr #sidebar1 { padding-top: 30px; }
    .twoColFixLtHdr #mainContent { zoom: 1; }
    /* the above proprietary zoom property gives IE the hasLayout it needs to avoid several bugs */
    </style>
    <![endif]-->
    <script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
    <script src="SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
    <link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
    <link href="SpryAssets/SpryMenuBarVertical.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
    <!--
    body {
        background-color: #FFF;
        margin-left: 20px;
    .twoColFixLtHdr #container #main3 #form1 div fieldset {
        border: thin ridge #CCC;
    -->
    </style>
    <script type="text/javascript">
    <!--
    function MM_goToURL() { //v3.0
      var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
      for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
    //-->
    </script>
    <link href="SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
    </head>
    <body class="twoColFixLtHdr">
    <div id="container">
      <div id="header">
        <div id="Righty">
          <ul id="MenuBar2" class="MenuBarHorizontal">
        <li><a href="index.php">Search</a>      </li>
        <li><a href="Member2.php">Members</a></li>
      </ul>
      <p> </p>
    </div>
    <span id="LoginDiv">
        <?php
          if (isset($_SESSION['MM_Username']))
            echo "hello ". $_SESSION['MM_Username']. "";
            echo " <a href='Logout.php'>Log out</a> ";
        else
            echo "
                <a href='Login.php'>Login</a> / <a href='Register.php'>Register</a>
        ?>
        </a></span>
    <div id="Middle">
      <h1 align="center">GuitarSwap</h1>
    </div>
      </div>
      <div id="sidebar1">
        <h4>Members Area</h4>
        <ul id="MenuBar1" class="MenuBarVertical">
          <li><a href="Member2.php">My Adverts</a></li>
          <li><a href="NewAdvert.php">Create new Advert</a></li>
          <li><a href="UpdateUserDets.php">My Account</a></li>
        </ul>
        <h3>  </h3>
      </div>
      <div id="mainContent">
        <h4>Update Advert</h4>
        <!-- end #mainContent -->
      </div>
      <!-- This clearing element should immediately follow the #mainContent div in order to force the #container div to contain all child floats -->
      <div id="main3">
        <div id="main">
          <fieldset>
            <legend>Please update advert details and confirm</legend>
            <form action="<?php echo $editFormAction; ?>" enctype="multipart/form-data" method="post" name="form4" id="form4">
              <input type="hidden" name="advert_id" value="<?php echo $row_Advert['advert_id']; ?>" />
              <p></p>
              <table width="650" align="center">
                <tr valign="baseline">
                  <td width="17" rowspan="15" valign="middle" nowrap="nowrap"><?php echo "<img src='upload/" .$row_Advert['PictureLocation']."' width='64' height='180'/>" ?></td>
                  <td width="133" align="right" nowrap="nowrap"> </td>
                  <td width="240" align="center" bgcolor="#CCCCCC"><strong>Offered</strong></td>
                  <td width="240" align="center" bgcolor="#CCCCCC"><strong>Wanted</strong></td>
                </tr>
                <tr valign="baseline">
                  <td nowrap="nowrap" align="right"><strong>Make:</strong></td>
                  <td bgcolor="#CCFFCC"><input name="O_Make" type="text" value="<?php echo $row_Advert['O_Make']; ?>" size="30" maxlength="15" /></td>
                  <td bgcolor="#CCFFFF"><input name="W_Make" type="text" value="<?php echo $row_Advert['W_Make']; ?>" size="30" maxlength="15" /></td>
                </tr>
                <tr valign="baseline">
                  <td nowrap="nowrap" align="right"><strong>Model:</strong></td>
                  <td bgcolor="#CCFFCC"><input name="O_Model" type="text" value="<?php echo $row_Advert['O_Model']; ?>" size="30" maxlength="30" /></td>
                  <td bgcolor="#CCFFFF"><input name="W_Model" type="text" value="<?php echo $row_Advert['W_Model']; ?>" size="30" maxlength="30" /></td>
                </tr>
                <tr valign="baseline">
                  <td nowrap="nowrap" align="right"><strong>Country:</strong></td>
                  <td bgcolor="#CCFFCC"><input name="O_Country" type="text" value="<?php echo $row_Advert['O_Country']; ?>" size="30" maxlength="15" /></td>
                  <td bgcolor="#CCFFFF"><input name="W_Country" type="text" value="<?php echo $row_Advert['W_Country']; ?>" size="30" maxlength="15" /></td>
                </tr>
                <tr valign="baseline">
                  <td nowrap="nowrap" align="right"><strong>Year:</strong></td>
                  <td bgcolor="#CCFFCC"><span id="sprytextfield1">
                  <input name="O_Year" type="text" value="<?php echo $row_Advert['O_Year']; ?>" size="4" maxlength="4" />
    <span class="textfieldInvalidFormatMsg">Invalid format.</span><span class="textfieldMinValueMsg">The entered value is less than the minimum required.</span><span class="textfieldMaxValueMsg">The entered value is greater than the maximum allowed.</span></span></td>
                  <td bgcolor="#CCFFFF"><span id="sprytextfield2">
                  <input name="W_Year" type="text" value="<?php echo $row_Advert['W_Year']; ?>" size="4" maxlength="4" />
    <span class="textfieldInvalidFormatMsg">Invalid format.</span><span class="textfieldMinValueMsg">The entered value is less than the minimum required.</span><span class="textfieldMaxValueMsg">The entered value is greater than the maximum allowed.</span></span></td>
                </tr>
                <tr valign="baseline">
                  <td nowrap="nowrap" align="right"><strong>Colour:</strong></td>
                  <td bgcolor="#CCFFCC"><input name="O_Colour" type="text" value="<?php echo $row_Advert['O_Colour']; ?>" size="30" maxlength="15" /></td>
                  <td bgcolor="#CCFFFF"><input name="W_Colour" type="text" value="<?php echo $row_Advert['W_Colour']; ?>" size="30" maxlength="15" /></td>
                </tr>
                <tr valign="baseline">
                  <td nowrap="nowrap" align="right"><strong>Body:</strong></td>
                  <td bgcolor="#CCFFCC"><input name="O_Body" type="text" value="<?php echo $row_Advert['O_Body']; ?>" size="30" maxlength="15" /></td>
                  <td bgcolor="#CCFFFF"><input name="W_Body" type="text" value="<?php echo $row_Advert['W_Body']; ?>" size="30" maxlength="15" /></td>
                </tr>
                <tr valign="baseline">
                  <td nowrap="nowrap" align="right"><strong>Neck:</strong></td>
                  <td bgcolor="#CCFFCC"><input name="O_Neck" type="text" value="<?php echo $row_Advert['O_Neck']; ?>" size="30" maxlength="15" /></td>
                  <td bgcolor="#CCFFFF"><input name="W_Neck" type="text" value="<?php echo $row_Advert['W_Neck']; ?>" size="30" maxlength="15" /></td>
                </tr>
                <tr valign="baseline">
                  <td nowrap="nowrap" align="right"><strong>Fingerboard:</strong></td>
                  <td bgcolor="#CCFFCC"><input name="O_Fingerboard" type="text" value="<?php echo $row_Advert['O_Fingerboard']; ?>" size="30" maxlength="15" /></td>
                  <td bgcolor="#CCFFFF"><input name="W_Fingerboard" type="text" value="<?php echo $row_Advert['W_Fingerboard']; ?>" size="30" maxlength="15" /></td>
                </tr>
                <tr valign="baseline">
                  <td nowrap="nowrap" align="right"><strong>Pickups:</strong></td>
                  <td bgcolor="#CCFFCC"><input name="O_Pickups" type="text" value="<?php echo $row_Advert['O_Pickups']; ?>" size="30" maxlength="15" /></td>
                  <td bgcolor="#CCFFFF"><input name="W_Pickups" type="text" value="<?php echo $row_Advert['W_Pickups']; ?>" size="30" maxlength="15" /></td>
                </tr>
                <tr valign="baseline">
                  <td nowrap="nowrap" align="right"><strong>Condition:</strong></td>
                  <td bgcolor="#CCFFCC"><label for="condition">
                    <select name="condition" size="1" id="condition">
                      <option selected="selected" value="" <?php if (!(strcmp("", $row_Advert['condition']))) {echo "selected=\"selected\"";} ?>>---select---</option>
                      <option value="immaculate" <?php if (!(strcmp("immaculate", $row_Advert['condition']))) {echo "selected=\"selected\"";} ?>>immaculate</option>
                      <option value="excellent" <?php if (!(strcmp("excellent", $row_Advert['condition']))) {echo "selected=\"selected\"";} ?>>excellent</option>
                      <option value="good" <?php if (!(strcmp("good", $row_Advert['condition']))) {echo "selected=\"selected\"";} ?>>good</option>
                      <option value="well used" <?php if (!(strcmp("well used", $row_Advert['condition']))) {echo "selected=\"selected\"";} ?>>well used</option>
                      <option value="poor" <?php if (!(strcmp("poor", $row_Advert['condition']))) {echo "selected=\"selected\"";} ?>>poor</option>
                  </select>
                  </label></td>
                  <td bgcolor="#FFFFFF"> </td>
                </tr>
                <tr valign="baseline">
                  <td nowrap="nowrap" align="right"><strong>Value:</strong></td>
                  <td bgcolor="#CCFFCC"><span id="sprytextfield3">
                  <input name="value" type="text" value="<?php echo $row_Advert['value']; ?>" size="11" maxlength="11" />
    <span class="textfieldInvalidFormatMsg">Invalid format.</span></span></td>
                  <td bgcolor="#FFFFFF"> </td>
                </tr>
                <tr valign="baseline">
                  <td align="right" valign="top" nowrap="nowrap"><strong>Comments:</strong></td>
                  <td bgcolor="#CCFFCC"><textarea name="Comments" cols="25" rows="3"><?php echo $row_Advert['Comments']; ?></textarea></td>
                  <td bgcolor="#FFFFFF"> </td>
                </tr>
                <tr valign="baseline">
                  <td nowrap="nowrap" align="right"><strong>Picture location</strong></td>
                  <td bgcolor="#CCFFCC"><label for="checkopentoalloffers"></label>                <input type="file" name="PictureLocation" value="<?php echo $row_Advert['PictureLocation']; ?>" size="20" /></td>
                  <td bgcolor="#FFFFFF"> </td>
                </tr>
                <tr valign="baseline">
                  <td height="26" align="right" nowrap="nowrap"><strong>Open to all offers:</strong></td>
                  <td bgcolor="#CCFFCC"><input name="checkopentoalloffers" type="checkbox" id="checkopentoalloffers" value="y" <?php if (!(strcmp($row_Advert['opentoalloffers'],"y"))) {echo "checked=\"checked\"";} ?> /></td>
                  <td bgcolor="#FFFFFF"> </td>
                </tr>
              </table>
              <p> </p>
              <div id="submitdiv">
                <input type="hidden" name="MM_update" value="form4" />
                <input name="submit button" type="submit" id="submit button" value="Update Advert" />
              </div>
              <div id="exitdiv">
                <label for="button15"></label>
                <input name="button" type="button" id="button15" onclick="MM_goToURL('parent','Member2.php');return document.MM_returnValue" value="Exit" />
                <label for="button16"></label>
              </div>
              <p> </p>
            </form>
          </fieldset>
          <script type="text/javascript">
    var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1", "integer", {validateOn:["blur"], minValue:1900, maxValue:2010, isRequired:false});
    var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1", "integer", {validateOn:["blur"], minValue:1900, maxValue:2010});
    var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2", "integer", {minValue:1900, maxValue:2010, validateOn:["blur"], isRequired:false});
    var sprytextfield3 = new Spry.Widget.ValidationTextField("sprytextfield3", "currency", {validateOn:["blur"], isRequired:false});
          </script>
          <br class="clearfloat" />
      <!-- end #container -->
    </div></div></div>
    <script type="text/javascript">
    <!--
    var  = new Spry.Widget.MenuBar("", {imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
    var MenuBar2 = new Spry.Widget.MenuBar("MenuBar2", {imgDown:"../SpryAssets/SpryMenuBarDownHover.gif", imgRight:"../SpryAssets/SpryMenuBarRightHover.gif"});
    var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
    //-->
    </script>
    </body>
    </html>
    <?php
    mysql_free_result($Advert);
    if (is_resource($Result1)) mysql_free_result($Result1);
    ?>

    Please note,
    Removing I investigated spry a little more, in the end I settled for removing spry altogether,
    Maybe it was because the text field in a $GET (for the default) AND a $PUT (for the update)

  • Problem with timestamp in query

    I have problem with timestamp in JPA query.
    I wonna select all data from database where difference between two timestamps is more than 3 month.
    Database:
    ID timestamp1 timestamp2
    1 20008-11-19 15:02000 20008-08-19 15:02000
    2 20008-11-19 15:02000 20008-11-14 15:02000
    @Column(name = "timestamp1", nullable = false)
    @Temporal(TemporalType.TIMESTAMP)
    public Date timestamp1;
    @Column(name = "timestamp2", nullable = false)
    @Temporal(TemporalType.TIMESTAMP)
    public Date timestamp2;
    sql query works:
    select id from table where
    MONTH( DATE(timestamp1) - DATE(timestamp2) ) > 3
    but how I can write in Java?
    I't doesnt wrk:
    Query query = em.createQuery("SELECT f.id FROM Foo f WHERE MONTH( DATE(f.timestamp1) - DATE(f.timestamp2) ) > 3 ")
    error:
    ExceptionUtil E CNTR0020E: EJB threw an unexpected (non-declared) exception during invocation of method .
    Exception data: <openjpa-1.0.2-r420667:627158 nonfatal user error> org.apache.openjpa.persistence.ArgumentException: An error occurred while parsing the query filter 'SELECT f.id FROM Foo f WHERE MONTH( DATE(f.timestamp1) - DATE(f.timestamp2) ) > 3'.
    Error message: <openjpa-1.0.2-r420667:627158 nonfatal user error> org.apache.openjpa.kernel.jpql.ParseException: Encountered "MONTH (" at character 438, but expected: ["(", "+", "-", ".", ":", "", "=", "?", "ABS", "ALL", "AND", "ANY", "AS", "ASC", "AVG", "BETWEEN", "BOTH", "BY", "CONCAT", "COUNT", "CURRENT_DATE", "CURRENT_TIME", "CURRENT_TIMESTAMP", "DELETE", "DESC", "DISTINCT", "EMPTY", "ESCAPE", "EXISTS", "FETCH", "FROM", "GROUP", "HAVING", "IN", "INNER", "IS", "JOIN", "LEADING", "LEFT", "LENGTH", "LIKE", "LOCATE", "LOWER", "MAX", "MEMBER", "MIN", "MOD", "NEW", "NOT", "NULL", "OBJECT", "OF", "OR", "ORDER", "OUTER", "SELECT", "SET", "SIZE", "SOME", "SQRT", "SUBSTRING", "SUM", "TRAILING", "TRIM", "UPDATE", "UPPER", "WHERE", <BOOLEAN_LITERAL>, <DECIMAL_LITERAL>, <IDENTIFIER>, <INTEGER_LITERAL>, <STRING_LITERAL>].
    at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder$ParsedJPQL.parse(JPQLExpressionBuilder.java:1665)
    at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder$ParsedJPQL.<init>(JPQLExpressionBuilder.java:1645)

    The error is indocating improper formatting of your JPQL string. MONTH is not understood. I would recommend using your SQL string in a createNativeQuery(...) call instead.
    Doug

  • Problem with output from  report to excel, calling the report from form 10g

    Hi everyone, I'm having a problem generating a excel from a report, which is called from a form, I'm using Forms 10g. The problem is this: My report has a variable number of columns. These columns appear according to data obtained from the database, these columns are dates, In vesion 6 excel file generated shows the columns one after another starting in column A1 to column CP. I mean that the dates are correlative. But in version 10g the excel file generated shows the same report starting in column A to column T, only shows the 20 dates correlative corresponding to this columns, the rest of the dates are down the excel sheet in groups of 20 dates, it's something, the file in 6i grows across and in 10g grows down the excel sheet. The report (rdf file) is the same in 6i and 10g, I compiled the 6i version to obtain the 10g version. The excel sheet generated in 10g looks like the report was in pdf format, because PDF format, cuts the report in pages and the file grows down, if I generate the report in PDF format it has the same structure excel file in 10g has. I hope yo can help because I have days trying to solve this but I have no succes. If someone could help I could email the excel files generated in two versions. Here I put the code I use to generate the files in 6i and 10g. I have tried with DESFORMAT=SPREADSHEET in 10g but the result is the same. Thanks for your help. Greetings for all.
    Code for version 6i (Works Very well)
    PROCEDURE GUARDAREXCEL IS
    pl_id ParamList;
    nom_rep varchar2(20);
    cla_rep varchar2(20);
    cod_dis varchar2(4);
    nom_arch varchar2(100);
    fec date;
    BEGIN
    pl_id := Get_Parameter_List('tmpdata');
    IF NOT Id_Null(pl_id) THEN
    Destroy_Parameter_List( pl_id );
    END IF;
    pl_id := Create_Parameter_List('tmpdata');
    IF :BK_PARAMETROS.LI_COD_DIS IS NOT NULL THEN
    cod_dis := :BK_PARAMETROS.LI_COD_DIS;
    END IF;
    IF :BK_PARAMETROS.TI_COD_CLI IS NOT NULL THEN
    Add_Parameter(pl_id,'P_COD_CLI',TEXT_PARAMETER,:BK_PARAMETROS.TI_COD_CLI||'%');
    ELSE
    Add_Parameter(pl_id,'P_COD_CLI',TEXT_PARAMETER,'%');
    :BK_PARAMETROS.TI_COD_CLI:='%';
    END IF;
    IF :BK_PARAMETROS.CLAS_REP=1 THEN
    cla_rep := '001';
    ELSE
         IF :BK_PARAMETROS.CLAS_REP=2 THEN
              cla_rep := '002';
         ELSE
              IF :BK_PARAMETROS.CLAS_REP=3 THEN
              cla_rep := '003';
         ELSE
              cla_rep := '004';
         END IF;
         END IF;
    END IF;
    Add_Parameter(pl_id,'P_COD_DIS',TEXT_PARAMETER, cod_dis);
    Add_Parameter(pl_id,'P_FECHA',TEXT_PARAMETER,to_char(:BK_PARAMETROS.FECFIN, 'DD/MM/YYYY'));
    Add_Parameter(pl_id,'P_CLASE',TEXT_PARAMETER, cla_rep);
    Add_Parameter(pl_id,'PARAMFORM',TEXT_PARAMETER,'NO');
    Add_Parameter(pl_id,'DESTYPE',TEXT_PARAMETER,'File');
    Add_Parameter(pl_id,'MODE',TEXT_PARAMETER,'Character');
    Add_Parameter(pl_id,'DESFORMAT',TEXT_PARAMETER,'DELIMITED' );
    select sysdate into fec from dual;
    IF :BK_PARAMETROS.TIPO_REP=1 THEN
         BEGIN
    nom_rep := 'tdvenrli1577.rep';
    nom_arch := 'c:\windows\temp\RepCobranzaPlanos' || TO_CHAR(fec, 'ddmmyyyy') || '.xls';
    END;
    ELSIF :BK_PARAMETROS.TIPO_REP=2 THEN
              BEGIN
              nom_rep := 'tdvenrli1578.rep';
              nom_arch := 'c:\windows\temp\RepCobranzaLargos' || TO_CHAR(fec, 'ddmmyyyy') || '.xls';
              END;
    ELSIF :BK_PARAMETROS.TIPO_REP=3 THEN
         BEGIN
                        Add_Parameter(pl_id,'P_XLS',TEXT_PARAMETER, '1');           
              nom_rep := 'tdvenrli1576.rep';
              nom_arch := 'c:\windows\temp\RepCobranzaDetallados' || TO_CHAR(fec, 'ddmmyyyy') || '.xls';      
              END;
    ELSE
              BEGIN
                        nom_rep := 'TDVENRLI1545.REP';
              nom_arch := 'c:\windows\temp\RepCobranzaTodos' || TO_CHAR(fec, 'ddmmyyyy') || '.xls';
              END;
    END IF;
    --Add_Parameter(pl_id,'DESNAME',TEXT_PARAMETER,nom_arch );
    Add_Parameter(pl_id,'DESNAME',TEXT_PARAMETER, nom_arch);
    standard.commit;
    Run_Product(REPORTS, nom_rep, SYNCHRONOUS, runtime, FILESYSTEM, pl_id,'');
    EXCEPTION WHEN Run_Product_Failure THEN
    message('Error');
    END;
    Code for version 10g
    PROCEDURE GUARDAREXCEL IS
    pl_id ParamList;
    nom_rep varchar2(20);
    cla_rep varchar2(20);
    cod_dis varchar2(4);
    nom_arch varchar2(100);
    fec date;
    --byt12122007.sn
    repid REPORT_OBJECT;
         vURL VARCHAR2(500);
         rep_status VARCHAR2(20);
         vJobID VARCHAR2(100);
         v_rep VARCHAR2(100);
    VAR NUMBER;
    w_name_repserv VARCHAR2(30);
    --byt1212007.en
    BEGIN
         --w_name_repserv:=F_OBTIENE_SERVREP;
    w_name_repserv:='repserv';     
    pl_id := Get_Parameter_List('mytmp_params');
    IF NOT Id_Null(pl_id) THEN
    Destroy_Parameter_List( pl_id );
    END IF;
    pl_id := Create_Parameter_List('mytmp_params');
    IF :BK_PARAMETROS.LI_COD_DIS IS NOT NULL THEN
         cod_dis := :BK_PARAMETROS.LI_COD_DIS;
    END IF;
    IF :BK_PARAMETROS.TI_COD_CLI IS NOT NULL THEN
    Add_Parameter(pl_id,'P_COD_CLI',TEXT_PARAMETER,:BK_PARAMETROS.TI_COD_CLI||'%');
    ELSE
    Add_Parameter(pl_id,'P_COD_CLI',TEXT_PARAMETER,'%');
    :BK_PARAMETROS.TI_COD_CLI:='%';
    END IF;
    IF :BK_PARAMETROS.CLAS_REP=1 THEN
    cla_rep := '001';
    ELSE
         IF :BK_PARAMETROS.CLAS_REP=2 THEN
              cla_rep := '002';
         ELSE
              IF :BK_PARAMETROS.CLAS_REP=3 THEN
              cla_rep := '003';
         ELSE
              cla_rep := '004';
         END IF;
         END IF;
    END IF;
    Add_Parameter(pl_id,'P_COD_DIS',TEXT_PARAMETER, cod_dis);
    Add_Parameter(pl_id,'P_FECHA',TEXT_PARAMETER,to_char(:BK_PARAMETROS.FECFIN, 'DD/MM/YYYY'));
    Add_Parameter(pl_id,'P_CLASE',TEXT_PARAMETER, cla_rep);
    Add_Parameter(pl_id,'PARAMFORM',TEXT_PARAMETER,'NO');
    /*Add_Parameter(pl_id,'DESTYPE',TEXT_PARAMETER,'File');
    Add_Parameter(pl_id,'MODE',TEXT_PARAMETER,'Character');
    Add_Parameter(pl_id,'DESFORMAT',TEXT_PARAMETER,'DELIMITED' );*/
    select sysdate into fec from dual;
    IF :BK_PARAMETROS.TIPO_REP=1 THEN
    BEGIN
         repid := find_report_object('tdvenrli1577');
    --nom_rep := 'tdvenrli1577.rep';
    nom_arch := 'c:\windows\temp\RepCobranzaPlanos' || TO_CHAR(fec, 'ddmmyyyy') || '.xls';
    SET_REPORT_OBJECT_PROPERTY(repid, REPORT_FILENAME,'tdvenrli1577');
    END;
    ELSIF :BK_PARAMETROS.TIPO_REP=2 THEN
    BEGIN
         repid := find_report_object('tdvenrli1578');      
              --nom_rep := 'tdvenrli1578.rep';
              nom_arch := 'c:\windows\temp\RepCobranzaLargos' || TO_CHAR(fec, 'ddmmyyyy') || '.xls';
              SET_REPORT_OBJECT_PROPERTY(repid, REPORT_FILENAME,'tdvenrli1578');
              END;
    ELSIF :BK_PARAMETROS.TIPO_REP=3 THEN
    BEGIN
         repid := find_report_object('tdvenrli1576');
                        Add_Parameter(pl_id,'P_XLS',TEXT_PARAMETER, '1');           
              --nom_rep := 'tdvenrli1576.rep';
              nom_arch := 'c:\windows\temp\RepCobranzaDetallados' || TO_CHAR(fec, 'ddmmyyyy') || '.xls';
              SET_REPORT_OBJECT_PROPERTY(repid, REPORT_FILENAME,'tdvenrli1576');     
              END;
    ELSE
    BEGIN
         repid := find_report_object('tdvenrli1545');
                        --nom_rep := 'TDVENRLI1545.REP';
              nom_arch := 'c:\windows\temp\RepCobranzaTodos' || TO_CHAR(fec, 'ddmmyyyy') || '.xls';
              SET_REPORT_OBJECT_PROPERTY(repid, REPORT_FILENAME,'tdvenrli1545');     
              END;
    END IF;
    --Add_Parameter(pl_id,'DESNAME',TEXT_PARAMETER,nom_arch );
    --Add_Parameter(pl_id,'DESNAME',TEXT_PARAMETER, nom_arch);
    standard.commit;
    SET_REPORT_OBJECT_PROPERTY(repid, REPORT_DESNAME,nom_arch);
    SET_REPORT_OBJECT_PROPERTY(repid, REPORT_COMM_MODE, SYNCHRONOUS);
         SET_REPORT_OBJECT_PROPERTY(repid, REPORT_EXECUTION_MODE, RUNTIME);
         SET_REPORT_OBJECT_PROPERTY(repid, REPORT_DESTYPE, 'File');
         SET_REPORT_OBJECT_PROPERTY(repid, REPORT_DESFORMAT, 'DELIMITED');
         SET_REPORT_OBJECT_PROPERTY(repid, REPORT_SERVER, w_name_repserv);
         SET_REPORT_OBJECT_PROPERTY(repid, REPORT_OTHER, 'paramform=no');
         v_rep := RUN_REPORT_OBJECT(repid, pl_id);
         rep_status := REPORT_OBJECT_STATUS(v_rep);
         WHILE rep_status IN ('RUNNING','OPENING_REPORT','ENQUEUED')     LOOP
              rep_status:= report_object_status(v_rep);
         END LOOP;
         IF rep_status = 'FINISHED' THEN
              vJobID := SUBSTR(v_rep, INSTR(v_rep, '_', -1)+1);
              vURL:='/reports/rwservlet/getjobid'||vJobID||'?'||'server='||w_name_repserv;
         END IF;
         WEB.SHOW_DOCUMENT(vURL, '_blank');
         IF NOT form_success THEN
              MESSAGE('Error: PL/SQL held against Button failed to execute');
              RAISE FORM_TRIGGER_FAILURE;
         END IF;
    /*Run_Product(REPORTS, nom_rep, SYNCHRONOUS, runtime, FILESYSTEM, pl_id,'');
    EXCEPTION WHEN Run_Product_Failure THEN
    message('Error');*/
    END;

    There are two problems with your VI.  First, the basic logic of writing/appending to a file (Excel, TDMS, anything) should go something like this:  Open the file, position yourself at the end of the file, then, in the loop, acquire data and write it to the file until you are finished with data acquisition.  When you exit the acquire/write to file loop, then close the file.  In particular, the opening and the closing of the file should not be inside the loop.
    As others have pointed out, writing to Excel might not be optimal, particularly if you are acquiring data at a high rate (and would therefore be writing a lot of data). We actually use Excel in our data acquisition routine, mainly reading from a WorkSheet to get the parameters of a particular stimulus, but also writing the outcome of the response to the stimulus.  As it happens, our "acquisition rate" in this example is on the order of several samples per minute, so there's no problem using Excel (we also sample 16 channels of analog data at 1 KHz -- this gets written as a binary file).
    Second, if you really do want to use Excel, use the (existing) Excel file to which you want to append as the "template" argument of the New Report function.  Then use the Excel Get Last Row function to position yourself at "end of file", as noted above.
    Good Luck.
    Bob Schor

  • Problem with conversion of strings like THISStr - this_str capitalization

    Problem with conversion of strings like. THISStr -> this_str
    Can anybody pass on the reverse code. I have one, but its faulty.
    public static String convertFromPolycaps(String str) {
              Pattern pattern = Pattern.compile("\\p{Upper}+");
              Matcher matcher = pattern.matcher(str);
              StringBuffer result = new StringBuffer();
              // We do manual replacement so we can change case
              boolean notFirst = false;
              int grpP = 0, grpA = 0;
              String last = "";
              String now = "";
              while (matcher.find()) {
                   grpA = matcher.end();
                   if (notFirst) {
                        now = matcher.group().substring(0).toLowerCase();
                        if (grpA - grpP > 1) {
                             matcher.appendReplacement(result, now);
                             result =
                                  new StringBuffer(
                                       result.substring(0, (result.length() - 1))
                                            + "_"
                                            + result.substring(result.length() - 1));
                        } else {
                             matcher.appendReplacement(result, "_" + now);
                   } else {
                        matcher.appendReplacement(result, matcher.group().substring(0).toLowerCase());
                        notFirst = true;
                   grpP = matcher.end();
                   ////index++;
                   last = now;
              matcher.appendTail(result);
              System.err.println(str + " : " + result.toString());
              return result.toString();
         }succesfully converts :
    AccountNmnc : account_nmnc
    CustNameJ : cust_name_j
    Resume : resume
    BeneBrCode : bene_br_code
    ApprovedPerson : approved_person
    but fails for:
    GLCode : glcode
    VISHALErrCode : vishalerr_code
    GHASUNNAcNo : ghasunnac_no

    Can anybody pass on the reverse code. I have one, but
    its faulty.Post it, I'm sure we can fix it...

  • What is the exact problem with this file?

    Hi all,
    There is an old form , which was not in use from many days.
    Now when we tried to run the form, i got the error saying "FRM-40734:Internal Error:Pl/SQL error occured.", in the login form.
    When i tried to open the fmb file in Oracle Forms Builder 6i, i got the following error:
    FRM-10102: Cannot attach PL/SQL library d2kwutil. This library attachment will be lost if the module is saved., but the fmb file got open.
    The login button has the following code:
    DECLARE
      UNAME VARCHAR2(30);
      --USER_ID PARAMLIST;
      V_USER APUSERMA.USER_NAME%TYPE;
      V_PASSWED APUSERMA.USER_PASSWD%TYPE;
    BEGIN
    select user_CD INTO :GLOBAL.USER_ID from apuserma 
    where user_CD = :TI_USER_NAME AND user_PASSWD = :IT_USER_PASSWD
    AND SYSDATE BETWEEN USER_VALID_FRM AND USER_VALID_TO;
    :global.user_id  := substr(win_api_environment.read_registry('HKEY_LOCAL_MACHINE\system\currentcontrolset\control\computername\computername','computername'),1,10);
    :global.compname := :compname;
    compnm(:compname);
    --USER_ID := CREATE_PARAMETER_LIST('USER_id_NAME');
    call_form('Forms\MAIN_SCREEN',hide,DO_REPLACE);
    exception
      when no_data_found then
      MESSAGE('Incorrect Username or Password.  Please Re-Enter');
      message(' ');
      RAISE FORM_TRIGGER_FAILURE;
    END;
    EXIT_FORM;
    When i tried to compile, i got error saying ,
    Error 201 at line 10, column 28
    identifier 'WIN_API_ENVIRONMENT.READ_REGISTRY' must be declared.
    I am not getting to know What is the exact problem with this file?
    Help me with this please.
    Thank You.
    Oracle forms builder 6i.
    Oracle 9i.

    Vijetha wrote:
    I also want to know what is the use of  win_api_environment.read_registry('HKEY_LOCAL_MACHINE\system\currentcontrolset\control\computername\computername','computername') ??
    What does it do??
    If i comment the following line , will it be a problem??
    :global.user_id  := substr(win_api_environment.read_registry('HKEY_LOCAL_MACHINE\system\currentcontrolset\control\computername\computername','computername'),1,10);
    Because i commented the above line & compiled, so it is not giving any error now.
    So please tell me what win_api_environment.read_registry does??
    it's read windows registry value. So, no problem if you comment it.
    Thanks

  • NT security problems with file I/O

    I have 2 problems with file I/O. When I read from a file I use the getAbsolutePath() method that is part of the File class to find what directory the files are currenlty. The problem is that the returned path says that the file is on the desktop no matter what directory the file really is in. The second problem is that I am unable to save files anywhere but the desktop. I must run the class files from the desktop too to get it to work.
    I am using NT 4.0 for development. I'm guessing that these problems might be NT security related. Could someone help me?
    Code below:
    import java.awt.*;
    import java.applet.*;
    import java.net.*;
    import java.io.File;
    import java.awt.event.*;
    //import java.security.*;
    //import sun.security.*;
    //import java.awt.Window;
    //import com.ms.security.*;
    public class Edit extends Applet implements ActionListener, ItemListener
    String Gselect;
    reader readit;
    int mhz, khz;
    TextField textField1;
    String freq = "000.000";
    String data;
    Choice freqC;
    Button ActivateB, SaveB, /*CancelB, HelpB,*/ DeleteB;
    Checkbox SetC;
    int NotUsedReply[] = new int[200];
    int HwListReply[] = new int[200];
    public void init()
    readit = new reader();
    String myFile="satellite.st1";
    // myFile = myFile.concat(Gselect);
    File satellite = new File(myFile);
    textField1 = new TextField();
    textField1.setText( "(void) " );
    add( textField1 );
    SetC = new Checkbox("TRAP-RX");
    add(SetC);
    SetC.addItemListener(this);
    freqC = new Choice();
    freqC.setSize(20,50);
    freqC.add("000.000");
    add(freqC);
    freqC.addItemListener(this);
    ActivateB = new Button("Activate");
    add(ActivateB);
    ActivateB.addActionListener(this);
    SaveB = new Button("Save");
    add(SaveB);
    SaveB.addActionListener(this);
    DeleteB = new Button("Delete");
    add(DeleteB);
    DeleteB.addActionListener(this);
         /*CancelB = new Button("Cancel");
    add(CancelB);
    CancelB.addActionListener(this);
         HelpB = new Button("Help");
    add(HelpB);
    HelpB.addActionListener(this);*/
    //textField1.setText( data );
    for(int a = 1; a < 9; a++)
    data = readit.getData(satellite.getAbsolutePath(), a);//("E:\\forte4j\\system\\Projects\\Zebra\\satellite.st1", a);
    freqC.addItem(data);
    textField1.setText(satellite.getAbsolutePath() );
    public void paint(Graphics g)
    //g.drawString("Radio Setup Files",20, 20);
    //g.drawString(getParameter("wse"),20, 20);
    public void actionPerformed(ActionEvent event)
    if(event.getSource() == ActivateB)
    activator();
    if(event.getSource() == SaveB)
    /*if(event.getSource() == CancelB)
    stop();
    if(event.getSource() == HelpB)
    if(event.getSource() == DeleteB)
    public void itemStateChanged(ItemEvent e)
    if(e.getItemSelectable() == SetC)
    textField1.setText("Check box 1 clicked!");
    if(e.getItemSelectable() == freqC)
    freq = ((Choice)e.getItemSelectable()).getSelectedItem();
    public void activator()
    makeMHZ();
    makeKHZ();
    if(mhz > 254)
    int StartLink[]={0x0c,0x01,0x07,0x00,0x00,0x00,0x00,0x00,0x00};          //New Link Proc Start
    int TrapConfig[]={0x25,0x80,0x00,0x00,0x00,0xb7,0x00,0x0c,0x0b,          //TRAP Configuration
    0x00,0x00,0x00,0xff,0xa0,0xff,0x0d,0xff,0xe8,
    0xff,0x0d,0xff,0x00,0xff,0x15,0xff,0xb0,0xff,
    0xff,0xff,0x94,0x0a,0x01,0x06,0x1a,0x00,0x0d,
    0x2d,0x21};
    TrapConfig[11]=(mhz-255);
    TrapConfig[12]=(khz/5);
    int SetUserOutput[]={0x41,0x42,0x49,0x54,0x52,0x41,0x50,0x20,0x34, //Sets User Output Format
    0x35,0x34,0x35,0x30,0x30,0x2e,0x30,0x4e,0x30,
    0x38,0x32,0x34,0x35,0x30,0x30,0x2e,0x30,0x57,
    0x30,0x31,0x30,0x30,0x2e,0x30,0x30,0x4b,0x4d,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00};
    sendget CmdFunc;
    CmdFunc=new sendget();
    try
    //PolicyEngine.assertPermission(PermissionID.SYSTEM);
    Socket h = new Socket("192.9.200.155",9000);
    Socket s = new Socket("192.9.200.155",9001);
    Socket t = new Socket("192.9.200.155",9002);
    int j;
    CmdFunc.SendCmd(h,0,0x01,null);
    CmdFunc.GetCmd(h,HwListReply);
    CmdFunc.SendCmd(s,9,0x1e,StartLink); //New Link Proc Start
    CmdFunc.GetCmd(s,NotUsedReply);
    CmdFunc.SendCmd(s,37,0x00,TrapConfig); //TRAP Configuration
    CmdFunc.GetCmd(s,NotUsedReply);
    CmdFunc.SendCmd(s,155,0x03,SetUserOutput);//Sets User Output Format
    CmdFunc.GetCmd(s,NotUsedReply);
    catch(Exception e){}
    else
    textField1.setText( "000.000 is the null choice. Try another." );
    public void receiveText1( String select )
    Gselect=select;
    public void makeMHZ()
    String y = freqC.getSelectedItem();
    y = y.substring(0,3);
    mhz = Integer.parseInt(y);
    //textField1.setText( y );
    public void makeKHZ()
    String y = freqC.getSelectedItem();
    y = y.substring(4,7);
    khz = Integer.parseInt(y);
    //textField1.setText( y );
    import java.awt.*;
    import java.applet.*;
    import java.io.RandomAccessFile;
    import java.io.FileNotFoundException;
    import java.io.IOException;
    import java.io.LineNumberReader;
    import java.awt.event.*;
    import com.ms.security.*;
    import netscape.security.*;
    import netscape.util.*;
    public class saver extends Applet implements ActionListener
    String nameS = "Data.txt";
    String dataS = "Default Data";
    Button saveB;
    public void init()
    saveB = new Button("SaveFile");
    add(saveB);
    saveB.addActionListener(this);
    public void actionPerformed(ActionEvent event)
    if(event.getSource() == saveB)
    RandomAccessFile RAF;
    byte array0[] = dataS.getBytes();
    try
    if (Class.forName("com.ms.security.PolicyEngine") != null)
    PolicyEngine.assertPermission(PermissionID.SYSTEM);
    if(Class.forName("netscape.security.PrivilegeManager") != null)
    netscape.security.PrivilegeManager.enablePrivilege("UniversalFileWrite");
    catch (Throwable cnfe)
    try
    RAF = new RandomAccessFile(nameS, "rw");
    // RAF.writeUTF(dataS);
    RAF.write(dataS.getBytes());
    RAF.close();
    catch(Exception e)
    public void receiveND(String name, String data)
    if(name != null)
    nameS = name;
    dataS=data;
    import java.io.RandomAccessFile;
    import java.io.FileNotFoundException;
    import java.io.IOException;
    import java.io.LineNumberReader;
    //import java.security.*;
    import com.ms.security.*;
    import netscape.security.*;
    import netscape.util.*;
    public class reader
    //Signature sig;
    public String getData(String filename, int pass)
    //String nameS = "Data.txt";
    String dataS = "Default Data Sucks";
    String comma = ",";
    int get = pass, count=0, top=0, bottom=0;
    char[] work;
    try
    if (Class.forName("com.ms.security.PolicyEngine") != null)
    PolicyEngine.assertPermission(PermissionID.SYSTEM);
    if(Class.forName("netscape.security.PrivilegeManager") != null)
    netscape.security.PrivilegeManager.enablePrivilege("UniversalFileRead");
    catch (Throwable cnfe)
    try
    //sig.sign();
    //nameS = filename;
    RandomAccessFile RAF = new RandomAccessFile(filename, "r");
    // dataS = RAF.readUTF();
    dataS = RAF.readLine();
    RAF.close();
    catch(Exception e)
    return e.toString();
    work = dataS.toCharArray();
    for(int i = 0; i < dataS.length(); i++)
    if( work[i] == ',' )
    count++;
    if(get == count)
    bottom = i + 1;
    if( (work[i] == ',') && (count > get) && (top == 0) )
    top = i;
    dataS = dataS.substring(bottom,top);
    return dataS;
    }

    import java.awt.*;
    import java.applet.*;
    import java.net.*;
    import java.io.File;
    import java.awt.event.*;
    //import java.security.*;
    //import sun.security.*;
    //import java.awt.Window;
    //import com.ms.security.*;
    public class Edit extends Applet implements ActionListener, ItemListener
    String Gselect;
    reader readit;
    int mhz, khz;
    TextField textField1;
    String freq = "000.000";
    String data;
    Choice freqC;
    Button ActivateB, SaveB, /*CancelB, HelpB,*/ DeleteB;
    Checkbox SetC;
    int NotUsedReply[] = new int[200];
    int HwListReply[] = new int[200];
    public void init()
    readit = new reader();
    String myFile="satellite.st1";
    // myFile = myFile.concat(Gselect);
    File satellite = new File(myFile);
    textField1 = new TextField();
    textField1.setText( "(void) " );
    add( textField1 );
    SetC = new Checkbox("TRAP-RX");
    add(SetC);
    SetC.addItemListener(this);
    freqC = new Choice();
    freqC.setSize(20,50);
    freqC.add("000.000");
    add(freqC);
    freqC.addItemListener(this);
    ActivateB = new Button("Activate");
    add(ActivateB);
    ActivateB.addActionListener(this);
    SaveB = new Button("Save");
    add(SaveB);
    SaveB.addActionListener(this);
    DeleteB = new Button("Delete");
    add(DeleteB);
    DeleteB.addActionListener(this);
    /*CancelB = new Button("Cancel");
    add(CancelB);
    CancelB.addActionListener(this);
    HelpB = new Button("Help");
    add(HelpB);
    HelpB.addActionListener(this);*/
    //textField1.setText( data );
    for(int a = 1; a < 9; a++)
    data = readit.getData(satellite.getAbsolutePath(), a);//("E:\\forte4j\\system\\Projects\\Zebra\\satellite.st1", a);
    freqC.addItem(data);
    textField1.setText(satellite.getAbsolutePath() );
    public void paint(Graphics g)
    //g.drawString("Radio Setup Files",20, 20);
    //g.drawString(getParameter("wse"),20, 20);
    public void actionPerformed(ActionEvent event)
    if(event.getSource() == ActivateB)
    activator();
    if(event.getSource() == SaveB)
    /*if(event.getSource() == CancelB)
    stop();
    if(event.getSource() == HelpB)
    if(event.getSource() == DeleteB)
    public void itemStateChanged(ItemEvent e)
    if(e.getItemSelectable() == SetC)
    textField1.setText("Check box 1 clicked!");
    if(e.getItemSelectable() == freqC)
    freq = ((Choice)e.getItemSelectable()).getSelectedItem();
    public void activator()
    makeMHZ();
    makeKHZ();
    if(mhz > 254)
    int StartLink[]={0x0c,0x01,0x07,0x00,0x00,0x00,0x00,0x00,0x00}; //New Link Proc Start
    int TrapConfig[]={0x25,0x80,0x00,0x00,0x00,0xb7,0x00,0x0c,0x0b, //TRAP Configuration
    0x00,0x00,0x00,0xff,0xa0,0xff,0x0d,0xff,0xe8,
    0xff,0x0d,0xff,0x00,0xff,0x15,0xff,0xb0,0xff,
    0xff,0xff,0x94,0x0a,0x01,0x06,0x1a,0x00,0x0d,
    0x2d,0x21};
    TrapConfig[11]=(mhz-255);
    TrapConfig[12]=(khz/5);
    int SetUserOutput[]={0x41,0x42,0x49,0x54,0x52,0x41,0x50,0x20,0x34, //Sets User Output Format
    0x35,0x34,0x35,0x30,0x30,0x2e,0x30,0x4e,0x30,
    0x38,0x32,0x34,0x35,0x30,0x30,0x2e,0x30,0x57,
    0x30,0x31,0x30,0x30,0x2e,0x30,0x30,0x4b,0x4d,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00};
    sendget CmdFunc;
    CmdFunc=new sendget();
    try
    //PolicyEngine.assertPermission(PermissionID.SYSTEM);
    Socket h = new Socket("192.9.200.155",9000);
    Socket s = new Socket("192.9.200.155",9001);
    Socket t = new Socket("192.9.200.155",9002);
    int j;
    CmdFunc.SendCmd(h,0,0x01,null);
    CmdFunc.GetCmd(h,HwListReply);
    CmdFunc.SendCmd(s,9,0x1e,StartLink); //New Link Proc Start
    CmdFunc.GetCmd(s,NotUsedReply);
    CmdFunc.SendCmd(s,37,0x00,TrapConfig); //TRAP Configuration
    CmdFunc.GetCmd(s,NotUsedReply);
    CmdFunc.SendCmd(s,155,0x03,SetUserOutput);//Sets User Output Format
    CmdFunc.GetCmd(s,NotUsedReply);
    catch(Exception e){}
    else
    textField1.setText( "000.000 is the null choice. Try another." );
    public void receiveText1( String select )
    Gselect=select;
    public void makeMHZ()
    String y = freqC.getSelectedItem();
    y = y.substring(0,3);
    mhz = Integer.parseInt(y);
    //textField1.setText( y );
    public void makeKHZ()
    String y = freqC.getSelectedItem();
    y = y.substring(4,7);
    khz = Integer.parseInt(y);
    //textField1.setText( y );
    import java.awt.*;
    import java.applet.*;
    import java.io.RandomAccessFile;
    import java.io.FileNotFoundException;
    import java.io.IOException;
    import java.io.LineNumberReader;
    import java.awt.event.*;
    import com.ms.security.*;
    import netscape.security.*;
    import netscape.util.*;
    public class saver extends Applet implements ActionListener
    String nameS = "Data.txt";
    String dataS = "Default Data";
    Button saveB;
    public void init()
    saveB = new Button("SaveFile");
    add(saveB);
    saveB.addActionListener(this);
    public void actionPerformed(ActionEvent event)
    if(event.getSource() == saveB)
    RandomAccessFile RAF;
    byte array0[] = dataS.getBytes();
    try
    if (Class.forName("com.ms.security.PolicyEngine") != null)
    PolicyEngine.assertPermission(PermissionID.SYSTEM);
    if(Class.forName("netscape.security.PrivilegeManager") != null)
    netscape.security.PrivilegeManager.enablePrivilege("UniversalFileWrite");
    catch (Throwable cnfe)
    try
    RAF = new RandomAccessFile(nameS, "rw");
    // RAF.writeUTF(dataS);
    RAF.write(dataS.getBytes());
    RAF.close();
    catch(Exception e)
    public void receiveND(String name, String data)
    if(name != null)
    nameS = name;
    dataS=data;
    import java.io.RandomAccessFile;
    import java.io.FileNotFoundException;
    import java.io.IOException;
    import java.io.LineNumberReader;
    //import java.security.*;
    import com.ms.security.*;
    import netscape.security.*;
    import netscape.util.*;
    public class reader
    //Signature sig;
    public String getData(String filename, int pass)
    //String nameS = "Data.txt";
    String dataS = "Default Data Sucks";
    String comma = ",";
    int get = pass, count=0, top=0, bottom=0;
    char[] work;
    try
    if (Class.forName("com.ms.security.PolicyEngine") != null)
    PolicyEngine.assertPermission(PermissionID.SYSTEM);
    if(Class.forName("netscape.security.PrivilegeManager") != null)
    netscape.security.PrivilegeManager.enablePrivilege("UniversalFileRead");
    catch (Throwable cnfe)
    try
    //sig.sign();
    //nameS = filename;
    RandomAccessFile RAF = new RandomAccessFile(filename, "r");
    // dataS = RAF.readUTF();
    dataS = RAF.readLine();
    RAF.close();
    catch(Exception e)
    return e.toString();
    work = dataS.toCharArray();
    for(int i = 0; i < dataS.length(); i++)
    if( work == ',' )
    count++;
    if(get == count)
    bottom = i + 1;
    if( (work == ',') && (count > get) && (top == 0) )
    top = i;
    dataS = dataS.substring(bottom,top);
    return dataS;

  • Having problem with spry menu bar in Internet Explorer.

    I'm having a problem with my spry menu bars in Internet Explorer.
    Here are the pictures:
    Firefox
    Internet Explorer
    HERE ARE THE CODES:
    HTML CODE:
    <style type="text/css">
    <!--
    #apDiv1 {
        position:absolute;
        width:160px;
        height:126px;
        z-index:1;
        left: 205px;
        top: 424px;
        margin: 0 auto;
    -->
    </style>
    <style type="text/css">
    #apDiv3 {
        position:absolute;
        width:254px;
        height:206px;
        z-index:2;
        left: 123px;
        top: 1529px;
    #apDiv4 {
        position:absolute;
        width:250px;
        height:194px;
        z-index:3;
        left: 381px;
        top: 1528px;
    #apDiv5 {
        position:absolute;
        width:256px;
        height:200px;
        z-index:4;
        left: 636px;
        top: 1529px;
    #apDiv6 {
        position:absolute;
        width:349px;
        height:205px;
        z-index:5;
        left: 889px;
        top: 1530px;
    </style>
    <style type="text/css">
    #apDiv7 {
        position:absolute;
        width:887px;
        height:204px;
        z-index:6;
        left: 324px;
        top: 905px;
    #apDiv8 {
        position:absolute;
        width:1295px;
        height:74px;
        z-index:1;
        left: 212px;
        top: 668px;
    </style>
    <script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
    <link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
    <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">
    #apDiv2 {
        position:absolute;
        width:209px;
        height:197px;
        z-index:2;
        top: 1220px;
        left: 171px;
    #apDiv9 {
        position:absolute;
        width:331px;
        height:97px;
        z-index:3;
        left: 385px;
        top: 1218px;
    #apDiv10 {
        position:absolute;
        width:292px;
        height:199px;
        z-index:4;
        left: 724px;
        top: 1218px;
    #apDiv11 {
        position:absolute;
        width:200px;
        height:115px;
        z-index:1;
    body {
        background-color: #000;
        background-image: url();
        text-align: center;
        color: #F00;
    .none {
        font-size: 80px;
        font-family: "Times New Roman", Times, serif;
        font-weight: bold;
    #apDiv12 {
        position:absolute;
        width:991px;
        height:60px;
        z-index:5;
        left: 198px;
        top: 192px;
    #apDiv13 {
        position:absolute;
        width:200px;
        height:115px;
        z-index:1;
        left: 588px;
        top: 322px;
    </style>
    <body onLoad="MM_preloadImages('images/WebConfroll.png','images/youthfootballroll.png','images/ statefbsweatshirt.png')">
    <p align="center" class="none"><img src="images/footballtitle.png" width="941" height="183"></p>
    <div align="center">
      <ul id="MenuBar2" class="MenuBarHorizontal">
        <li><a class="MenuBarItemSubmenu" href="#">[Placeholder]</a>
          <ul>
            <li><a href="#">[Placeholder]</a></li>
            <li><a href="#">[Placeholder]</a></li>
            <li><a href="#">[Placeholder]</a></li>
          </ul>
        </li>
        <li><a href="#" class="MenuBarItemSubmenu">[Placeholder]</a>
          <ul>
            <li><a href="#">[Placeholder]</a></li>
            <li><a href="#">[Placeholder]</a></li>
            <li><a href="#">[Placeholder]</a></li>
          </ul>
        </li>
        <li><a class="MenuBarItemSubmenu" href="#">Videos</a>
          <ul>
            <li><a class="MenuBarItemSubmenu" href="#">2008 Videos</a>
              <ul>
                <li><a href="videos/2009 videos/Glenbard part one/partone.html">Glenbard South Game</a></li>
                <li><a href="#">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&# 160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;[Placeholder]</a></li>
              </ul>
            </li>
            <li><a href="#" class="MenuBarItemSubmenu">2009 Videos</a>
              <ul>
                <li><a href="#">[Placeholder]</a></li>
                <li><a href="#">[Placeholder]</a></li>
              </ul>
            </li>
            <li><a href="#" class="MenuBarItemSubmenu">2010 Videos</a>
              <ul>
                <li><a href="#">[Placeholder]</a></li>
                <li><a href="#">[Placeholder]</a></li>
              </ul>
            </li>
          </ul>
        </li>
      </ul>
    </div>
    <p align="center"> </p>
    <p align="center"> </p>
    <p align="center"> </p>
    <p align="center"> </p>
    <p align="center"> </p>
    <p align="center"> </p>
    <p align="center"> </p>
    <p align="center"> </p>
    <p align="center"> </p>
    <p align="center"> </p>
    <p align="center"> </p>
    <p align="center"><span class="cent"><img src="images/bulldoghelmit.png" width="150" height="99" /></span></p>
    <p align="center"> </p>
    <p align="center"> </p>
    <p align="center"> </p>
    <p class="cent"> </p>
    <div align="center">
      <ul id="MenuBar1" class="MenuBarHorizontal">
        <li> <a class="MenuBarItemSubmenu" href="#">Football Season 2008</a>
          <ul>
            <li><a href="http://page.bps101.net/web/t1350/Football2009/2008%20Defense%20Stats.pdf">Defense Stats</a></li>
            <li><a href="http://page.bps101.net/web/t1350/Football2009/2008%20Offense%20Stats.pdf">Offense and Records</a></li>
            <li><a href="http://page.bps101.net/web/t1350/BHS%20All%20Time%20Stats.pdf">AllTime Data</a></li>
            <li><a href="http://page.bps101.net/web/t1350/Football2009/Western%20Sun%202009.pdf">Western Sun Final Standings</a></li>
          </ul>
        </li>
        <li> <a href="#" class="MenuBarItemSubmenu">Football Season 2009</a>
          <ul>
            <li><a href="http://page.bps101.net/web/t1350/Football%202010/2009%20Banquet%20Record%20and%20Stats.pdf">Defense Stats</a></li>
            <li><a href="http://page.bps101.net/web/t1350/Football%202010/2009%20Banquet%20Record%20and%20Stats.pdf">Record Book and Offense</a></li>
            <li><a href="http://page.bps101.net/web/t1350/Football%202010/All-Time%20Data%202009.pdf">Alltime Data</a></li>
          </ul>
        </li>
        <li> <a class="MenuBarItemSubmenu" href="#">Football Season 2010</a>
          <ul>
            <li><a href="http://page.bps101.net/web/t1350/Football%202011/2011%20Checklist.pdf">2010-2011 Offseason Checklist</a></li>
            <li><a href="http://page.bps101.net/web/t1350/Football%202011/2010%20Defense%20Stats%20Final.pdf">Defense Stats</a></li>
            <li><a href="http://page.bps101.net/web/t1350/Football%202011/2010%20Stats%20Packet.pdf">Record Book and Offense</a></li>
            <li><a href="http://page.bps101.net/web/t1350/Football%202011/2010%20ALL%20TIME.pdf">Alltime Data</a></li>
          </ul>
        </li>
      </ul>
    </div>
    <p align="center"> </p>
    <p align="center"> </p>
    <p> </p>
    <p> </p>
    <p> </p>
    <p> </p>
    <p align="center"> </p>
    <p align="center"> </p>
    <p align="center"> </p>
    <p align="center"><img src="images/Batavia Youth football.png" alt="" width="869" height="200" /></p>
    <p align="center"> </p>
    <p align="center"> </p>
    <p align="center"> </p>
    <p align="center"><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image4','','images/WebConfroll.png',1)"></a></p>
    <div align="center">
      <div align="center"></div>
      <div align="center"><a href="http://www.athletics2000.com/upstate8/" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image7','','images/WebConfroll.png',1)"><img src="images/WebConf.png" name="Image7" width="206" height="194" border="0" id="Image7" /></a><a href="http://www.bataviayouthfootball.org/" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image6','','images/statefbsweatshirt.png',1)"><img src="images/statefbsweatshirt.jpg" name="Image6" width="375" height="199" border="0" id="Image6" /></a><a href="http://www.bataviayouthfootball.org/" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image8','','images/youthfootballroll.png',1)"><img src="images/youth football.png" name="Image8" width="329" height="197" border="0" id="Image8" /></a></div>
    </div>
    <p align="center"> </p>
    <p align="center"> </p>
    <p align="center"><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image5','','images/youthfootballroll.png',1)"></a></p>
    <p align="center"> </p>
    <p align="center"> </p>
    <p align="center"> </p>
    <p align="center"> </p>
    <p align="center"> </p>
    <p align="center"> </p>
    <p align="center"> </p>
    <p align="center"> </p>
    <p align="center"> </p>
    <p align="center"> </p>
    <p align="center"> </p>
    <p align="center"> </p>
    <p align="center"> </p>
    <p align="center"><img src="images/Logos.png" width="1167" height="199" /></p>
    <script type="text/javascript">
    var MenuBar2 = new Spry.Widget.MenuBar("MenuBar2", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
    var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
    </script>
    CSS CODE
    @charset "UTF-8";
    /* SpryMenuBarHorizontal.css - version 0.6 - Spry Pre-Release 1.6.1 */
    /* Copyright (c) 2006. Adobe Systems Incorporated. All rights reserved. */
    LAYOUT INFORMATION: describes box model, positioning, z-order
    /* The outermost container of the Menu Bar, an auto width box with no margin or padding */
    ul.MenuBarHorizontal
        margin: auto 0;
        padding: 0;
        list-style-type: none;
        font-size: 100%;
        cursor: default;
        width: 54em;
        border-top: thick solid #00F;
        border-left: thick solid #00F;
        border-right: thick solid #00F;
        border-bottom: thick solid #00F;
        height: 2.2em;
    /* Set the active Menu Bar with this class, currently setting z-index to accomodate IE rendering bug: http://therealcrisp.xs4all.nl/meuk/IE-zindexbug.html */
    ul.MenuBarActive
        z-index: 1000;
    /* Menu item containers, position children relative to this container and are a fixed width */
    ul.MenuBarHorizontal li
        margin: 0;
        padding: 0;
        list-style-type: none;
        font-size: 100%;
        position: relative;
        cursor: pointer;
        width: 18em;
        float: left;
    /* Submenus should appear below their parent (top: 0) with a higher z-index, but they are initially off the left side of the screen (-1000em) */
    ul.MenuBarHorizontal ul
        margin: 0;
        padding: 0;
        list-style-type: none;
        font-size: 100%;
        z-index: 1020;
        cursor: default;
        width: 18em;
        position: absolute;
        left: -1000em;
    /* Submenu that is showing with class designation MenuBarSubmenuVisible, we set left to auto so it comes onto the screen below its parent menu item */
    ul.MenuBarHorizontal ul.MenuBarSubmenuVisible
        left: auto;
    /* Menu item containers are same fixed width as parent */
    ul.MenuBarHorizontal ul li
        width: 18em;
    /* Submenus should appear slightly overlapping to the right (95%) and up (-5%) */
    ul.MenuBarHorizontal ul ul
        position: absolute;
        margin: -5% 0 0 95%;
    /* Submenu that is showing with class designation MenuBarSubmenuVisible, we set left to 0 so it comes onto the screen */
    ul.MenuBarHorizontal ul.MenuBarSubmenuVisible ul.MenuBarSubmenuVisible
        left: auto;
        top: 0;
    DESIGN INFORMATION: describes color scheme, borders, fonts
    /* Submenu containers have borders on all sides */
    ul.MenuBarHorizontal ul
        border: 1px solid #CCC;
    /* Menu items are a light gray block with padding and no text decoration */
    ul.MenuBarHorizontal a
        display: block;
        cursor: pointer;
        background-color: #000;
        padding: 0.5em 0.75em;
        color: #C96;
        text-decoration: none;
        text-align: center;
        height: 1.2em;
    /* Menu items that have mouse over or focus have a blue background and white text */
    ul.MenuBarHorizontal a:hover, ul.MenuBarHorizontal a:focus
        background-color: #900;
        color: #009;
    /* Menu items that are open with submenus are set to MenuBarItemHover with a blue background and white text */
    ul.MenuBarHorizontal a.MenuBarItemHover, ul.MenuBarHorizontal a.MenuBarItemSubmenuHover, ul.MenuBarHorizontal a.MenuBarSubmenuVisible
        background-color: #900;
        color: #FFF;
        text-decoration: underline;
    SUBMENU INDICATION: styles if there is a submenu under a given menu item
    /* Menu items that have a submenu have the class designation MenuBarItemSubmenu and are set to use a background image positioned on the far left (95%) and centered vertically (50%) */
    ul.MenuBarHorizontal a.MenuBarItemSubmenu
        background-image: url(SpryMenuBarDown.gif);
        background-repeat: no-repeat;
        background-position: 95% 50%;
        color: #FF0;
        font-family: "Lucida Console", Monaco, monospace;
    /* Menu items that have a submenu have the class designation MenuBarItemSubmenu and are set to use a background image positioned on the far left (95%) and centered vertically (50%) */
    ul.MenuBarHorizontal ul a.MenuBarItemSubmenu
        background-image: url(SpryMenuBarRight.gif);
        background-repeat: no-repeat;
        background-position: 95% 50%;
    /* Menu items that are open with submenus have the class designation MenuBarItemSubmenuHover and are set to use a "hover" background image positioned on the far left (95%) and centered vertically (50%) */
    ul.MenuBarHorizontal a.MenuBarItemSubmenuHover
        background-image: url(SpryMenuBarDownHover.gif);
        background-repeat: no-repeat;
        background-position: 95% 50%;
    /* Menu items that are open with submenus have the class designation MenuBarItemSubmenuHover and are set to use a "hover" background image positioned on the far left (95%) and centered vertically (50%) */
    ul.MenuBarHorizontal ul a.MenuBarItemSubmenuHover
        background-image: url(SpryMenuBarRightHover.gif);
        background-repeat: no-repeat;
        background-position: 95% 50%;
    BROWSER HACKS: the hacks below should not be changed unless you are an expert
    /* HACK FOR IE: to make sure the sub menus show above form controls, we underlay each submenu with an iframe */
    ul.MenuBarHorizontal iframe
        position: absolute;
        z-index: 1010;
        filter:alpha(opacity:0.1);
    /* HACK FOR IE: to stabilize appearance of menu items; the slash in float is to keep IE 5.0 from parsing */
    @media screen, projection
        ul.MenuBarHorizontal li.MenuBarItemIE
            display: inline;
            f\loat: left;
            background: #FFF;
    The website is http://wwww.bataviabulldogfootball.tk

    Note that running your page through the W3C Validator gives this list of errors: http://validator.w3.org/check?uri=http%3A%2F%2Fwww.bataviabulldogfootball.tk%2F&charset=%2 8detect+automatically%29&doctype=Inline&group=0
    I see that you have a very thin doctype at the top. I suggest you create a new page in Dreamweaver and copy the bit at the top of the page:
    <!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" />
    Then put that code in place of these lines from your current page:
    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="utf-8" />
    I see that you have two opening <body> tags. Delete one; it is not needed. Add the preload images from the second into the first body tag and delete the second.
    I see code below the closing </html> tag. Re position it before the closing </body> tag.
    Because of these errors mentioned above, it was impossible to see the page. Fix and reply here when you have done so.
    Also, it is not possible for me to divine what difficulty you are having. If you can please also express it in English (LOL), I'll be happy to suggest a correction for you!
    Beth
    p.s. Posting entire blocks of code is NEVER as helpful as giving us a link to the pages in action. I seldom read through code dumps here in the Forum.
    Message was edited by: Zabeth69

  • Problems with date in procedure on Oracle 11g

    Hi gurus,
    I have some problems with the date format on Oracle 11g.
    Let me explain the situation:
    When I am starting a request like
    select to_number(to_char(to_date('01.04.2009','dd.mm.yyyy'), 'yyyy'))
    from sys.dual
    I got as result 2009 as number.
    When I do the same in a procedure of a package like this
    my_year := to_number(to_char(to_date('01.04.2009','dd.mm.yyyy'), 'yyyy'));
    the variable my_year contains the value 9 instead of 2009.
    Can someone explain me what's going wrong?
    I have just tested with changing the environment variable nls_date_format for the session and for the complete database with no success.
    Regards,
    Björn

    Thank you all for your replies so far:
    @Alex: You are right, using your short script in sqlplus gives me also 2009 as result
    So, I am now posting the essential excerpts of the procedure because the whole one is to large:
    function insert_szrl (my_fremd_name varchar, my_elementadresse varchar,
    my_zeitstempel varchar, my_wert float,
    my_status varchar, my_zyklus varchar,
    my_offset integer,
    my_quelle varchar, my_nzm_daten integer) return integer is
    begin
    my_date := to_date (substr (my_zeitstempel, 1, 10), 'dd.mm.yyyy') + my_tageswechsel +1/24;
    if my_zyklus = 'mm' then
    my_zeitstempeldate := add_months(to_date(last_day(to_date(my_date, 'dd.mm.yyyy')), 'dd.mm.yyyy'),-1) +1 + (my_tageswechsel+1/24);
    my_days := to_date(last_day(to_date(my_date, 'dd.mm.yyyy')), 'dd.mm.yyyy') - add_months(to_date(last_day(to_date(my_date, 'dd.mm.yyyy')), 'dd.mm.yyyy'),-1);
    my_year := to_number(to_char(to_date(my_date,'dd.mm.yyyy'), 'yyyy'));
    ptime.umschalttage_tuned (my_year, my_ws, my_sw);
    end if;
    While debugging the complete procedure I see since the start only a date which looks like '01.04.2009 07:00:00'
    Edited by: user10994305 on 19.05.2009 15:58
    Edited by: user10994305 on 19.05.2009 15:58

Maybe you are looking for

  • Desktop/Finder keeps rebooting after upgraded to Maverick (mac mini hooked up to a home theater system)

    My desktop keeps rebooting ever since I upgraded to Mavericks. Current setup, Mac Mini hooked up to home theater (Panasonic SC-HTB20) that is then hooked up to my Panasonic Plasma TV. I usually leave my Mac Mini on running and at least once a day whe

  • XML Publisher Error with reports

    Hi All, I am geting the following error with a report published using XML Publisher The XML page cannot be displayed Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later. The system c

  • Missing export options when exporting Excel from the CRXIR2 CrystalReportVi

    Hi! This is an app ported from CR9 to CRXIR2/Net. I print to screen using the CrystalReportViewer in a Windows form. Export button is enabled, but when I click and export to say "Excel", no further dialog is shown. Ie I never get the one wherev you n

  • Is the gapless / pause problem with Lossless files solved on 120 GB?

    Hey everyone, I broke my trusty fifth gen 80 GB iPod a few months ago and recently purchased a 160 GB Classic to replace it. I've had two problems that I now know from searching this form that everyone else has had - the iPod pauses between tracks (a

  • Oracle Text -- ctxsys.context

    Hi We are creating a oracle text index on one table . The table contains 200 million records The script is failing in the middle by giving the error unable to extend temp segement by 128 in temp table space. Can you please provide any suggestions of