SQL tag not working

This is killing me why this doesn't work. This is populating a SELECT. I have the exact same setup in another application. The only major difference is this use mysql, the one that works uses SQL Server 2000. Table name and columns are different too, but the point is the same thing; fill a SELECT with values.
The query appears to return nothing. I get a select with just a comma (",") in it.
<sql:setDataSource
     driver="com.mysql.jdbc.Driver"
     url="jdbc:mysql://localhost/FABL"
     user=""
     password="" />
<sql:query var="result">
     SELECT ID, FIRSTNAME, LASTNAME FROM CUSTOMERS ORDER BY LASTNAME, FIRSTNAME
</sql:query>
<select size="10" name="custid" size="1">
  <c:forEach items="${result.rows}" var="row">
     <option value="${row.id}">${row.lastname}, ${row.firstname}</option>
  </c:forEach>
</select>Thanks,
Karl

I am using JSP 2.0 so the <c:out> shouldn't be neededJSP 2.0 has nothing to do with it. It's JSTL 1.0 or 1.1 that matters. Which one are you using? (I use JSTL 1.0, hence the <c:out>)
There is no error. It just populates my SELECT with a single comma.Sure? I'd still add an error page that would display an exception if I got one.
Permissions shouldn't be a problem. I ripped the datasource URL, user, and password straight from a
bean that works fine.All that's fine, but MySQL GRANTs permission on an IP address basis. If the server on which the servlet/JSP engine runs isn't in the GRANT tables it won't have access.
But that wouldn't explain why you only get a comma. Frankly, I don't know based on what you've posted.
I'd break the problem down further. I'd write an object that would do the database work on my behalf and exercise it on the command line to make sure that it worked.
I'd move all that SQL code out of the JSP and onto the middle tier where it belongs. I'd have the Java Bean that I just wrote to do the database interactions on my behalf in a <jsp:useBean> tag and simply iterate through the list of returned values. That's what JSPs are really for: display, not server side things like database interactions.

Similar Messages

  • What will you do if any SQL is not working.in oracle 10g...apps 11.5.10.2

    What will you do if any SQL is not working. in oracle 10g....apps 11.5.10.2

    928714 wrote:
    yes sir.If you help me in answering my questions i wll be very thankful to you sir.
    tnx,I haven't a clue.
    As you have been advised in many of your posts, go study the documentation for whichever specific topic you are interested in.
    For me to answer your questions, I would need to go get that documentation.
    Then I would need to read that documentation.
    Then I would need to write a forum post that interprets what I think I learned from that documentation.
    It is so very much faster if YOU go do that instead of posting to a forum and expecting others to do it. You will remember what you study for a lot longer time if you teach yourself.

  • Force encryption on SQL Server not working?

    Hello Everyone,
    I'm running SQL Server 2008 64-bit. I've installed a self-signed cert on the box and set  "Force Encryption"  and restarted SQL server. 
    I setup a client machine to trust the authority of the cert installed on the server. When I connect to that SQL server from SSMS from a client machine and select the "encrypt connection" option in the client Connection properties, SSMS correctly complains
    that the cert on the server does not match the computer name I asked to log into . This is because, although the cert is trusted, the dns name dos not match the CN in the cert <- Perfect, exactly what I am expecting.
    When I connect to the same SQL server from the same client but  UNCHECK "encrypt connection" on the client, I'm able to login. Considering I've checked the "Force Encryption" on the server, the server should have rejected the connection. Why not?
    Ameer Deen

    Hi all,
    We are implementing a Merge Synchronization solution which involves three SQL Servers located on three Azure locations worldwide and one on-premises location. We need to secure communications between all servers. We are evaluating the encryption of all server
    communications through SSL:
    http://technet.microsoft.com/en-us/library/ms191192.aspx
    When we configure one server (let’s call it server A) to accept only encrypted connections (with Force Encryption=Yes) we still can connect from other server (let’s call it server B) that do not have the certificate installed. We would expect the server
    B to fail in the attempt of connect as server A should only accept encrypted communications and those should need the certificated to encrypt/decrypt everything (commands and data).
    We have also review the following forum post that is very similar to this one:
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/bde679d9-ff83-4fa7-b402-42e336a97106/force-encryption-on-sql-server-not-working
    In all cases the Microsoft answer is:
    “When the
    Force Encryption option for the Database Engine is set to YES, all communications between client and server is encrypted no matter whether the “Encrypt
    connection” option (such as from SSMS) is checked or not. You can check it using the following DMV statement”
    When we run the provided DMV statement to check if encryption is enabled:
    -- To check whether connections are encrypted between server and clients
    SELECT encrypt_option
    FROM sys.dm_exec_connections
    We get “TRUE”. So theoretically encryption is enabled.
    Then:
    Why can we run SQL statements against server A from server B (with SSMS) without any certificate?
    Are we wrong when we expect server A to refuse any client that do not have the right certificate?
    How can server B, without any certificate, decrypt the data encrypted by server A?
    Our intention is to encrypt all server in the same way so all of them will accept only encrypted communications. We are assuming that the Merge Agent will be able to communicate with the Publisher and the Subscriber through this encrypted environment. May
    anyone please confirm ti?
    Thanks for your help.
    Best Regards
    Benjamin Moles

  • ScriptLink tag not working for application page sharepoint 2010

    <ScriptLink> tag not working for application page sharepoint 2010 for including javascript in application page, it appends either 1033 or _layout to path specified for javascript.But javascripts are located in custom document library on site and not
    in _layouts folder.
    Please help and explain in details as I tried lot on this.

    Hi,
    Use the following line of code
    <SharePoint:Scriptlink runat="server" Name="~sitecollection/Style Library/[YOUR SITE]/js/functions.js" Language="javascript" />
    Thanks,
    Vivek
    Please vote or mark your question answered, if my reply helps you

  • [svn] 3921: Fix for - @inheritDoc tag not working for get/ set overrides when you only override the setter of a base class

    Revision: 3921
    Author: [email protected]
    Date: 2008-10-28 06:23:00 -0700 (Tue, 28 Oct 2008)
    Log Message:
    Fix for - @inheritDoc tag not working for get/set overrides when you only override the setter of a base class
    QE Notes: Baselines for framework test will need to be updated.
    Doc Notes: None
    Reviewer: Paul
    Bugs: SDK-17304
    tests: checkintests
    Ticket Links:
    http://bugs.adobe.com/jira/browse/SDK-17304
    Modified Paths:
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/asdoc/ASDocExtension.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/asdoc/ClassTable.java

    Revision: 3921
    Author: [email protected]
    Date: 2008-10-28 06:23:00 -0700 (Tue, 28 Oct 2008)
    Log Message:
    Fix for - @inheritDoc tag not working for get/set overrides when you only override the setter of a base class
    QE Notes: Baselines for framework test will need to be updated.
    Doc Notes: None
    Reviewer: Paul
    Bugs: SDK-17304
    tests: checkintests
    Ticket Links:
    http://bugs.adobe.com/jira/browse/SDK-17304
    Modified Paths:
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/asdoc/ASDocExtension.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/asdoc/ClassTable.java

  • Sql is not working after changing from MsAccess into sql server

    Following Sql  is not working after changing from MsAccess into sql server. 
    sum(trn.sales) as sales,
    sum(trn.cost) as cost,
    sales - cost as profit // Here is not working . can we not use sales a column. Please advise
    from trn
    Kind Regards
    pol
    polachan

    It will not work if use two different column from the table or column  from two  different table
    Example
    sum(trn.sales * trn.rate) as salesAmount,
    sum(trn.cost) as cost,
    sum(trn.salesAmount)-sum(trn.cost) as profit ----- Here is not working . can we not use sales a column. Please advise
    from trn
    Regards
    polachan

  • Insert SQL does not work properly when called using CALL

    I have a stored procedure (TEST_SP) which is used to insert a record in this perticular case. The SQL statement is 2526 characters long. I'm using
    dim Params : Params=chr(1) & "Insert query" & Chr(1) & "=300"
    runsql=&"{call TEST_SP(?,?)}"&Params 
    dim db : db=dbSelect("",0,"","")
    dbExecSQL db,runsqlto execute the stored procedure. I'm facing an issue when the 2000th character on the insert SQL (pUPDSQL) is a single quote, where the SQL is not getting executed (i.e. record is not getting created).
    The same stored procedure and the same SQL when run as below
    runsql=runsql&"DECLARE "
    runsql=runsql&"PUPDSQL VARCHAR2(4000); "
    runsql=runsql&"PRES VARCHAR2(300); "
    runsql=runsql&"BEGIN "
    runsql=runsql&"PUPDSQL := 'INSERT query..."
    runsql=runsql&"PRES:=300; "
    runsql=runsql&"MRT_LKIDFULUP(PUPDSQL => PUPDSQL,PRES => PRES); "
    runsql=runsql&"END; "
    dim db : db=dbSelect("",0,"","")
    dbExecSQL db,runsqlis working fine. Does anyone know if there is a limitaion in ODBC Call function or any explanation to above behaviour? I'm connecting to a Oracle 11g database using Microsoft ODBC for Oracle driver on Window 7
    The stored procedures:
    create or replace procedure TEST_SP(pUPDSQL IN VARCHAR2,pRES OUT VARCHAR2)
    AS
    BEGIN
    DECLARE
      emsg VARCHAR2(100);
    BEGIN
    if pUPDSQL&lt;&gt;'-1' then
      emsg:='Cant exec UPDATE';
      EXECUTE IMMEDIATE pUPDSQL;
        if SQL%RowCount=0 then
        pRES:='ERR:No row updated';
        return;
      end if;
    end if;
    pRES:='OK:';
    EXCEPTION
      WHEN OTHERS THEN
       pRES:='ERR:' || emsg;
    END;
    END;Edited by: BluShadow on 11-Dec-2012 15:47
    added {noformat}{noformat} tags for readability.  Please read {message:id=9360002} and learn to do this yourself in future.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    ... I'm facing an issue when the 2000th character on the insert SQL (pUPDSQL) is a single quote, ...Perhaps you need two single quotes? like:
    runsql=runsql&"PUPDSQL := 'INSERT query...Values(..,..,,,''This value in two single quotes'',..,...)' "
    ... I'm connecting to a Oracle 11g database using Microsoft ODBC ...Dump windoze ODBC and better use the Oracle client ODBC.
    :p

  • ORACLE tags not working after 1.5.1 patch

    I have some logic in my template the looks up information from some Oracle tables. This logic worked fine in 1.5.0, however, after applying the 1.5.1 patch it does not perform the Oracle logic, but shows the Oracle code as HTML on the page. Here is the code in question: (This is not the entire code, but one HTML TD that comes before the Oracle code, and one HTML TD that comes after it)
    <TD align="center" valign="top"><A
    href="/pls/portal/PORTAL.home"><IMG src="#WORKSPACE_IMAGES#ihome.gif" alt="Home" border="0"></A></TD>
    <ORACLE>
    BEGIN htp.tableData(htf.anchor2('javascript:help_openTopic(''/insitehelp/Insite_Help.htm'', ''' || pkg_insite_general.help_link(v('APP_ID'), v('APP_PAGE_ID')) || ''')', '', '', '', '><IMG src="#WORKSPACE_IMAGES#ihelpl.gif" alt="Help" border=0'), 'center');
    END;
    </ORACLE>
    <TD align="center" valign="top"><IMG src="#WORKSPACE_IMAGES#ilogout.gif" alt="Logout" border="0"></TD>
    This is what displays on the web page:
    BEGIN htp.tableData(htf.anchor2('javascript:help_openTopic(''/insitehelp/Insite_Help.htm'', ''' || pkg_insite_general.help_link(v('APP_ID'), v('APP_PAGE_ID')) || ''')', '', '', '', '>

    Your removal of functionality in a bug fix has broken a production application for us. This does not seem like something that should have been done with a "patch"
    I have just read all that I can find on "shortcuts" and am not finding what I need.
    Here is what we are doing:
    We are using RoboHelp for our help content. We have a help icon and a help link on the header of the page. This is defined in our template. We have to have the name of the module (Page Alias) to link the page being run to the help content for that page. Since you do not have a system variable for page name or page alias, I have had to put this information into an Oracle table. I was looking that up with a function within the Oracle Tags.
    Can I create a shortcut that would create the following code pl/sql code into a PL/SQL function body:
    BEGIN
    htp.tableData(htf.anchor2('javascript:help_openTopic(''/insitehelp/Insite_Help.htm'', ''' || pkg_insite_general.help_link(v('APP_ID'), v('APP_PAGE_ID')) || ''')', '', '', '', '><IMG src="#WORKSPACE_IMAGES#ihelpl.gif" alt="Help" border=0'), 'center');
    END;
    and call this shortcut where this help icon needs to appear like:
    <TD align="center" valign="top">
    "CALLHELPWITHICON"
    </TD>
    I have done the above, but it does not work. What am I doing wrong, how can I get this to work? We have had to remove our help icons because of this patch.
    I thank you so for your research on this.

  • PL/SQL program not working when connect database via SqlNet

    Hi,
    This is a segment of a PL/SQL program before opening a cursor using input descriptor. It is working fine ( to get the value of unOutputCount ) without connect to a database via SqlNet, can anyone tell me why it is not working ( unOutputCount return 0)while connecting to a database via SqlNet and how to make it work without opening a cursor before DESCRIBE OUTPUT ...?
    EXEC SQL ALLOCATE DESCRIPTOR GLOBAL 'input_111'
    WITH MAX 100;
    EXEC SQL ALLOCATE DESCRIPTOR GLOBAL 'output_111'
    WITH MAX 100;
    EXEC SQL PREPARE STMT1 FROM :psSqlStatement;
    EXEC SQL DECLARE CURSOR1 CURSOR FOR STMT1;
    EXEC SQL DESCRIBE INPUT STMT1
    USING DESCRIPTOR GLOBAL 'input_111';
    /* Get count of input parameters in statement */
    EXEC SQL GET DESCRIPTOR GLOBAL 'input_111' :unInputCount = COUNT;
    EXEC SQL DESCRIBE OUTPUT STMT1
    USING DESCRIPTOR GLOBAL 'output_111';
    /* Get count of output parameters in statement */
    EXEC SQL GET DESCRIPTOR GLOBAL 'output_111'
    :unOutputCount = COUNT;

    Hi,
    Welcome to Oracle OTN Forums!
    I changed your code a little. I think this help you
    CREATE OR REPLACE
    PROCEDURE xx_test
    IS
      v_pid VARCHAR2(100);
      v_cn  VARCHAR2(100);
      v_id  VARCHAR2(1000);
      v_val VARCHAR2(1000);
      CURSOR C1
      IS
        (SELECT product_id, 'PRODUCT_ID'  cn
            FROM product1 );
      BEGIN
        FOR V1 IN C1
        LOOP
          FETCH C1 INTO v_pid, v_cn;
          dbms_output.put_line('==== '||v_pid||'==== '||v_cn);
          EXECUTE IMMEDIATE
          'SELECT product_id, DECODE(COUNT (product_id),1,MAX (product_id))||'''||V_CN||''' as val
            FROM product1
           WHERE product_id =:a
           GROUP BY product_id)' INTO v_id, v_val USING v_pid;
          dbms_output.put_line('==== '||v_id||'==== '||v_val);
          EXECUTE IMMEDIATE 'UPDATE product2 SET '||v_cn||' = ' ||''''|| v_val ||''''|| ' WHERE product_id = :b' USING v_pid;
          dbms_output.put_line('++++ '||v_cn||'++++ '||v_val||'++++ '||v_pid);
        END LOOP;
      END xx_test;

  • My first PL/SQL block not working with using Select query within begin

    I am new to PL/SQL , just started with basics of BLOCKS .
    I am having a query here in executing a block .
    When i am doing a insert oprtation in Blocks Begin method everything is working fine , but when ever i tried to do select operation , some error is being thrown .
    First of all This is my Table :
    select from try :*
    KEY      VALUE
    Key     Value
    Key1     Value1
    Key2     Value2
    Key3     Value3
    ======================
    This is the code which is not working : Please see the code and tell me what is the problem .
    DECLARE
    v_KEY    VARCHAR2(20);
    v_VALUE   VARCHAR2(20);
    BEGIN
    select key into v_KEY FROM try where v_value='Value' ;
    dbms_output.put_line(v_KEY);
    END;
    When i run this code , it is saying Data Not Found on this line " select key into v_KEY FROM try where v_value='Value' ;"
    wheer when i run tis individually it worked fine :
    select KEY FROM try where VALUE='Value' ;"
    please share your ideas .as why it isn't running ??
    Edited by: user10503747 on Sep 20, 2010 3:16 AM

    Hi,
    user10503747 wrote:
    I am new to PL/SQL , just started with basics of BLOCKS .
    I am having a query here in executing a block .
    When i am doing a insert oprtation in Blocks Begin method everything is working fine , but when ever i tried to do select operation , some error is being thrown .
    First of all This is my Table :
    select from try :*
    KEY      VALUE
    Key     Value
    Key1     Value1
    Key2     Value2
    Key3     Value3
    ======================
    This is the code which is not working : Please see the code and tell me what is the problem .
    DECLARE
    v_KEY    VARCHAR2(20);
    v_VALUE   VARCHAR2(20);
    BEGIN
    select key into v_KEY FROM try where v_value='Value' ;
    dbms_output.put_line(v_KEY);
    END;
    When i run this code , it is saying Data Not Found on this line " select key into v_KEY FROM try where v_value='Value' ;"
    wheer when i run tis individually it worked fine :
    select KEY FROM try where VALUE='Value' ;"
    please share your ideas .as why it isn't running ??
    Edited by: user10503747 on Sep 20, 2010 3:16 AMInstead of:
    {code}
    select key into v_KEY FROM try where v_value='Value' ;
    {code}
    perhaps you meant something like:
    {code}
    v_value := 'Value1';
    select key into v_KEY FROM try where v_value=Value ; -- No quotes
    {code}
    Until you assign a vlue to a variable, like v_value, it is NULL, so your original statement was equivalent to
    {code}
    select KEY FROM try where NULL='Value' ;
    {code}
    In PL/SQL, a SELECT ... INTO statement must return exactly one row, or else you will get an error (either NO_DATA_FOUND or TOO_MANY_ROWS). This is different from SQL, where a query cn return any number of rows, including 0, without raising an error.

  • Inline transform for Sql Query not working in SAP MII 12.1 Version 12.1.8 B

    Hi All,
    I applied an xslt for an sql query which returns an xml file.
    I used inline transform icon in sql query to load an xsl file which has to return me a string
    Any idea why is not working for me..?
    My Sample XML file:
                                     <?xml version="1.0" encoding="UTF-8"?>
    <?xml-stylesheet type="text/xsl" href="/XMII/CM/BatchDisposition/BatchQueueManagement/StyleSheets/ProductXsl.xsl"?>
    <Rowsets DateCreated="2011-05-05T07:27:45" EndDate="2011-05-05T07:27:45" StartDate="2011-05-05T06:27:45" Version="12.1.8 Build(20)">
         <Rowset>
              <Columns>
                   <Column Description="ProductName" MaxRange="1" MinRange="0" Name="ProductName" SQLDataType="12" SourceColumn="ProductName"/>
              </Columns>
              <Row>
                   <ProductName>Asprin 100mg Tablets 12 x10 strip</ProductName>
              </Row>
              <Row>
                   <ProductName>Asprin 300mg Tablets 12 x10 strip</ProductName>
              </Row>
              <Row><ProductName>Ibprooven 200mg Tablets 12 x 10 strip</ProductName></Row>
              <Row><ProductName>RipTide 50mg Tablets 40 x10 strip</ProductName></Row>
              <Row><ProductName>Seroquel 200mg Tablets 6 x10 strip</ProductName></Row>
              <Row><ProductName>Seroquel 400mg Tablets 12 x10 strip</ProductName></Row>
         </Rowset>
    </Rowsets>
    My Sample XSl File:
                                    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="/">
         <xsl:text>["</xsl:text>
         <xsl:for-each select="Rowsets/Rowset/Row">
              <xsl:value-of select="ProductName"/>
              <xsl:if test="position() &lt; last()">
                   <xsl:text>","</xsl:text>
                    </xsl:if>
              <xsl:if test="position()=last()">
                           <xsl:text>"]</xsl:text>
                    </xsl:if>
         </xsl:for-each>
    </xsl:template>
    </xsl:stylesheet>
    Any Suggestions  are Welcome:
    Thanks

    Something like this should work...
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
         <xsl:template match="/">
              <Rowsets DateCreated="{Rowsets/@DateCreated}" Version="{Rowsets/@Version}" StartDate="{Rowsets/@StartDate}" EndDate="{Rowsets/@EndDate}">
                   <xsl:copy-of select="/Rowsets/FatalError"/>
                   <xsl:copy-of select="/Rowsets/Messages"/>
                   <Rowset>
                   <Columns>
                        <Column Description="Mycol1" MaxRange="1" MinRange="0" Name="Mycol1" SQLDataType="12" SourceColumn="Mycol1" />
                   </Columns>
                   <Row>
                   <Mycol1>
                   <xsl:text>["</xsl:text>
                        <xsl:for-each select="/Rowsets/Rowset/Row">
                             <xsl:value-of select="." />
                             <xsl:choose>
                                  <xsl:when test="position() &lt; last()"><xsl:text>","</xsl:text></xsl:when>
                                  <xsl:otherwise><xsl:text>"]</xsl:text></xsl:otherwise>
                             </xsl:choose>
                        </xsl:for-each>
                   </Mycol1>
                   </Row>
                   </Rowset>
              </Rowsets>
         </xsl:template>
    </xsl:stylesheet>

  • SQL (Reverse) not working in Forms 6i

    Hi:
    Env 6i c/s 8i DB.
    SELECT REVERSE ( '321' ) FROM DUAL works in SQL*Plus but does not accept the REVERSE function from within a Trigger. I could put the logic in a Package on the DB but I'd like to know why it does not work in F6i ?
    Thanks
    N.

    Forms 6i uses an older version of PL/SQL than the database, so it does not recognize the newly introduced function. You will need to create a database function to call from the form.

  • SQL Code not working in Forms Developer?

    Hi all,
    I'm using Oracle 10g and I have th following code running on iSQL+ but not working on Forms and I got the following erro
    The SQL code:
         select returningreason
            from (
                     select returningreason,
                     dense_rank() over (partition by 1 order by count(*) desc) as drnk
                     from returned_goods
                     group by returningreason)
           where drnk = 1;And the error happens near the word over to the right and the error statement is:
    Error 103 at line 18, column 19
       Encountered the symbol "(" when expecting one of the following:
             , formThanks in advance :)

    Triggers are compiled in forms so need to use only the features available to forms, which doesn't include all the new stuff in the database.
    select over partition
    NVL2They don't work in forms and reports too.
    Also if you use them in record Group
    Forms/SQL Compiler was not lined up to the database(10G).
    Meanwhile,for example. Pipelined TABLE and relative Select work in Reports AND Forms.

  • SQL tab not working in V2.1 EA1 for non-DBA users -- how to fix?

    In v2.1 EA 1 the tab to show the SQL script (DDL) in the object browser is not working for non-DBA users. In the prior version, these users would see a message about DBMS_METADATA and then the message would indicate that an "internal generator" would be used to generate the DDL script. After that brief message the DDL would show up as expected. This doesn't seem to be the case in the newest version.
    I issued the following two grants to a particular user which worked, but I am reluctant to issue the grants to "PUBLIC".
    SQL> grant execute on DBMS_METADATA to XXXXX;
    SQL> grant select_catalog_role to XXXXX;
    So, my questions are:
    1) Will the old functionality (that didn't require these privileges) be added to V2 at some point?
    2) What security implications are there for issueing the above grants to PUBLIC?
    NOTE: After granting execute on the DBMS_METADATA package, it still didn't work. I left that grant in place and granted SELECT_CATAOG_ROLE, so I can't say for sure that the 1st grant was required.
    Edited by: user615070 on Nov 19, 2009 9:30 AM
    Edited by: user615070 on Nov 19, 2009 10:06 AM

    An OEM account is separate from the database account. You need to use OEM UI to create an OEM account, however, for certain tasks to be done in the databases which OEM is monitoring they will also require separate database accounts within those databases. For example, to view the performance tab in OEM UI, a database account is required.
    OEM only has two types of users, i.e. Super Administrator and Administrator, but don't go by the names. You can grant an OEM 'Administrator' account access to specific targets and what they can do within OEM, such as only viewing reports, targets, and so on. For access within a database, the user created need not be a DBA either.
    I hope you understand.

  • Sql  functions in Pl/Sql region not working

    Hi all,
    I have created a pl/sql region like this
    This is the example taken from denes kubicek
    DECLARE
       v_counter     INTEGER         := 0;
       v_line        VARCHAR2 (4000);
       v_rec_in_row  INTEGER         := 6;
    BEGIN
       HTP.prn ('<table>');
       HTP.prn ('<tr>');
       HTP.prn ('<td>');
       FOR c IN
          (SELECT CASE
                     WHEN LOWER(SUBSTR(SUBSTR(NAME,INSTR(NAME,'/')+1), -3, 3)) = 'doc'
                        THEN    '<table>'
                             || '<tr><td><img src="#WORKSPACE_IMAGES#user_green_locked.gif"/></td></tr>'
                             || '<tr><td style="text-align:center">'
                             || SUBSTR(NAME,INSTR(NAME,'/')+1)  name
                             || '</td></tr></table>'
                     WHEN LOWER(SUBSTR(SUBSTR(NAME,INSTR(NAME,'/')+1), -3, 3)) = 'xls'
                        THEN    '<table>'
                             || '<tr><td><img src="#WORKSPACE_IMAGES#user_yellow.gif"/></td></tr>'
                             || '<tr><td style="text-align:center">'
                             || SUBSTR(NAME,INSTR(NAME,'/')+1) name
                             || '</td></tr></table>'
                    WHEN LOWER(SUBSTR(SUBSTR(NAME,INSTR(NAME,'/')+1), -3, 3)) = 'ppt'
                        THEN    '<table>'
                             || '<tr><td><img src="#WORKSPACE_IMAGES#user_yellow.gif"/></td></tr>'
                             || '<tr><td style="text-align:center">'
                             || SUBSTR(NAME,INSTR(NAME,'/')+1) name
                             || '</td></tr></table>'
                   WHEN LOWER(SUBSTR(SUBSTR(NAME,INSTR(NAME,'/')+1), -3, 3)) = 'txt'
                        THEN    '<table>'
                             || '<tr><td><img src="#WORKSPACE_IMAGES#user_yellow.gif"/></td></tr>'
                             || '<tr><td style="text-align:center">'
                             || SUBSTR(NAME,INSTR(NAME,'/')+1) name
                             || '</td></tr></table>'
                   WHEN LOWER(SUBSTR(SUBSTR(NAME,INSTR(NAME,'/')+1), -3, 3)) = 'gif'
                        THEN    '<table>'
                             || '<tr><td><img src="#WORKSPACE_IMAGES#user_yellow.gif"/></td></tr>'
                             || '<tr><td style="text-align:center">'
                             || SUBSTR(NAME,INSTR(NAME,'/')+1) name
                             || '</td></tr></table>'
                     ELSE    '<table>'
                          || '<tr><td><img src="#WORKSPACE_IMAGES#user_red.gif"/></td></tr>'
                          || '<tr><td style="text-align:center">'
                          || SUBSTR(NAME,INSTR(NAME,'/')+1) name
                          || '</td></tr></table>'
                  END doc
             FROM con_doc_info)
       LOOP
          v_line := v_line || c.doc || '</td><td>';
          v_counter := v_counter + 1;
          IF v_counter = v_rec_in_row
          THEN
             HTP.prn (v_line);
             HTP.prn ('</td></tr><tr><td>');
             v_line := NULL;
             v_counter := 0;
          END IF;
       END LOOP;
       HTP.prn (v_line);
       HTP.prn ('</td></tr></table>');
    END;but the functions are not working?
    Any idea ? Please help me

    Hi fac
    Database version is 10g
    This sample code is working
    DECLARE
       v_counter     INTEGER         := 0;
       v_line        VARCHAR2 (4000);
       v_rec_in_row  INTEGER         := 6;
    BEGIN
       HTP.prn ('<table>');
       HTP.prn ('<tr>');
       HTP.prn ('<td>');
       FOR c IN
          (SELECT CASE
                     WHEN deptno = 20
                        THEN    '<table>'
                             || '<tr><td><img src="#WORKSPACE_IMAGES#user_green_locked.gif"/></td></tr>'
                             || '<tr><td style="text-align:center">'
                             || ename
                             || '</td></tr></table>'
                     WHEN deptno = 30
                        THEN    '<table>'
                             || '<tr><td><img src="#WORKSPACE_IMAGES#user_yellow.gif"/></td></tr>'
                             || '<tr><td style="text-align:center">'
                             || ename
                             || '</td></tr></table>'
                     ELSE    '<table>'
                          || '<tr><td><img src="#WORKSPACE_IMAGES#user_red.gif"/></td></tr>'
                          || '<tr><td style="text-align:center">'
                          || ename
                          || '</td></tr></table>'
                  END emp
             FROM emp)
       LOOP
          v_line := v_line || c.emp || '</td><td>';
          v_counter := v_counter + 1;
          IF v_counter = v_rec_in_row
          THEN
             HTP.prn (v_line);
             HTP.prn ('</td></tr><tr><td>');
             v_line := NULL;
             v_counter := 0;
          END IF;
       END LOOP;
       HTP.prn (v_line);
       HTP.prn ('</td></tr></table>');
    END;This code is working good images are displayed as per the deptno.
    I need to display images for the documents which i have uploaded and stored in a file
    I am taking the name and in that last three letters alone and according to that pictures should appear
    My previous code while running no output is there.
    Hope I am more clear now
    bye
    Srikavi

Maybe you are looking for

  • Issue with instance config.ini

    Hello All, I have added one line code in my instance config.ini file <WebConfig> <ServerInstance> <ForceRefresh>TRUE</ForceRefresh> </ServerInstance> </WebConfig> as per my knowledge it will by presentation server query and cache not OBI server cache

  • Need urgent help with HSDIO hardware timing

    Hi everyone, I need urgent help regarding HSDIO hardware timing. I've been working in a project which generating serial ramp using HSDIO pxie device.  I'm using clock rate 40MHz and generating 14 bit of boolean for each step of ramp. And I have to ge

  • Video signal via Airport

    Hi. Is there any way to transfer the video signal using an Airport?

  • User Exit variable to determine Month to date

    Hello folks, wondering if someone could please assist with this problem.  I have  a need for a user exit variable that will determine the MTD based on a user input from another variable.  For example, if a user enters 09/15/2009, the exit will know t

  • Correct way to open pdf in ai?

    Hello: I created a design for a window cling using InDesign and submitted it to the printer as a cmyk PDF. The vendor is now requesting an ai file. Illustrator is outside my skill set, but I do have it as part of CS6. I opened the PDF in Illustrator