Query - Cannot Retrieve the Data / Result Set

Hello,
I'm trying to query a cube through the OLAP connection using Java and every time I try to execute a query an exception is thrown stating "Cannot retrieve the data set" or "Cannot retrieve the result set" depending on how I'm doing the query.  I've tried to execute the query both through the use of an IBIQuery and IBICommandProcessor object as well as directly through the IBIOlap connection via an MDX statement and both methods produce the same exception.  If anyone can shed some light on why exception is being thrown it would be greatly appreciated.

please help me ... The question has nothing to do with 'getting' data from excel and certainly not with putting it into MySQL.
The stack trace specifically tells you that your connection string is wrong.
It also tells you which connection string is wrong.
Which you can use to determine specifically which one is wrong. And which you did not provide that info to us.

Similar Messages

  • Cannot retrieve the data from excel sheet

    hi all ...
    i am trying to retrieve the data from excel sheet and at the same time i am inserting the data into mysql database.
    code is as follows
    try{             Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");             conn1=DriverManager.getConnection("jdbc:odbc:"+estr,"","");             Class.forName("com.mysql.jdbc.Driver");             conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/"+ t_dsn ,"root","manager");             sql="select * from student_info";             srch2 = conn.prepareStatement(sql);             rs1 = srch2.executeQuery();             String query  = "select * from ["+einput+"$]";             String query1= "select  count(*) from ["+einput+"$]";             st  = conn1.createStatement();             rs  = st.executeQuery(query);             ResultSetMetaData rsmd = rs.getMetaData();             c = rsmd.getColumnCount();//gets the column count             rs1  = st.executeQuery(query1);             while (rs1.next())  //loop to get no. of rows             {                 r = rs1.getInt(1);             }             rs = st.executeQuery(query);             for(i=1;i<=r;i++){                 rs.next();                 for(j=1;j==c;j++) {                     a = rs.getString(j);                     b= rs.getString(j);                     d = rs.getString(j);                 }                 rs1.next();                 PreparedStatement ps2 = conn.prepareStatement("insert into materials_out values(?,?,?)");                 ps2.setString(1,a);                 ps2.setString(2,b);                 ps2.setString(3,d);                 ps2.executeUpdate();             }         }catch(Exception e){             e.printStackTrace();         }
    but it is showing error as :
    java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name too long
    at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6957)
    at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7114)
    at sun.jdbc.odbc.JdbcOdbc.SQLDriverConnect(JdbcOdbc.java:3073)
    at sun.jdbc.odbc.JdbcOdbcConnection.initialize(JdbcOdbcConnection.java:323)
    at sun.jdbc.odbc.JdbcOdbcDriver.connect(JdbcOdbcDriver.java:174)
    at java.sql.DriverManager.getConnection(DriverManager.java:582)
    at java.sql.DriverManager.getConnection(DriverManager.java:185)
    at Outward_register.jButton2ActionPerformed(Outward_register.java:368)
    at Outward_register.access$400(Outward_register.java:23)
    at Outward_register$5.actionPerformed(Outward_register.java:312)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
    at java.awt.Component.processMouseEvent(Component.java:6038)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3260)
    at java.awt.Component.processEvent(Component.java:5803)
    at java.awt.Container.processEvent(Container.java:2058)
    at java.awt.Component.dispatchEventImpl(Component.java:4410)
    at java.awt.Container.dispatchEventImpl(Container.java:2116)
    at java.awt.Component.dispatchEvent(Component.java:4240)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
    at java.awt.Container.dispatchEventImpl(Container.java:2102)
    at java.awt.Window.dispatchEventImpl(Window.java:2429)
    at java.awt.Component.dispatchEvent(Component.java:4240)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
    please help me ...

    please help me ... The question has nothing to do with 'getting' data from excel and certainly not with putting it into MySQL.
    The stack trace specifically tells you that your connection string is wrong.
    It also tells you which connection string is wrong.
    Which you can use to determine specifically which one is wrong. And which you did not provide that info to us.

  • My iphone won't turn on and i have tried everything possible but right now, I cannot retrieve the data from it and it will not connect to my computer whatsoever, so is there a way to retrieve my pictures and data?

    i have been frustrated all day and been going around asking Apple experts about this and it has to my decision to get a new phone since it's out of warranty but I want the images I have on the broken iPhone. Is there any possible way to retrieve it.
    Btw, it is not photostreamed

    Are you sure that the battery is not empty: when the battery is VERY empty (that is when it was on and a long time off the charger) it may take an hour or even more to start charging with the charger connected. When you have an iPad charger you can also use that one, and it charges a bit faster.

  • How should i use the two results sets in one single report data region?

    Hi frnz,
     I have to create a report using the below condition...
    Here my given data  set query gives you the two result sets ,so how should i use that two result sets information in single report....when i accessing that data set query it will take the values off the first result set not for the second result set.
    without using sub report and look up functionality..... if possible
    is there any way to achieve this.....Please let me know..
    Thanks!

    You cant get both resultsets in SSRS. SSRS dataset will only take the first resultset
    you need to either create them as separate queries or merge them into a single resultset and return with ad additional hardcoded field which indicates resultset (ie resultset1,resultset2 etc)
    Then inside SSRS report you can filter on the field to fetch individual resultsets at required places. While merging you need to make sure metadata of two resultsets are made consistent ie number of columns and correcponding column data types should be same.
    In absence of required number of columns just put some placeholders using NULL
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • POST-QUERY trigger cannot retrieve the database field in TEMPLATE.fmb

    I have tried to create a form using TEMPLATE.fmb in Oracle Apps R11i. I found that the POST-QUERY trigger cannot retrieve the database field (which is display item property) properly. Can anyone tell me how to retrieve the displayed database fields? Thanks for any helps.

    POST-QUERY would fire after the query has been executed, it does not do the actual data retrieve.
    See if the items you have put have the data source properties set and are not control items.
    btw, this forum is for OA users, you would get better response to your query if you post it in forms forum
    Thanks,
    Tapash

  • I allowed ATT store to re set my iphone 4 and need to know if there might be a way to retrieve the data

    I allowed ATT store to re set my iphone 4 and need to know if there might be a way to retrieve the data?

    Resetting should not have deleted your data. 
    But if you backed your phone up to iTunes or iCloud you should be able to restore it from there.
    http://support.apple.com/kb/HT1414

  • HT1766 My daughter locked herself out of her phone cannot remember the advanced password setting, we share an Itunes account and both recently joined the cloud, if she resets her phone all her information will be gone, will it affect the data on my phone

    My daughter locked herself out of her phone cannot remember the advanced password setting, we share an Itunes account and both recently joined the cloud, if she resets her phone all her information will be gone, will it affect the data on my phone as well

    No, when resetting an iPhone it resets the actual data contained within the phone, nothing on your iCloud will be affected. It is a good idea to use seperate iClouda and iTunes accounts then you can each create your own backups regularly without your daughters backup overwriting yours or vice versa.

  • ORA-19279 How do I write a query to return the data?

    I have XMLType tables in Oracle 11. I insert XML data from documents and each table only contains one XML document. I can write queries to return outer tags and inner tags but not outer and inner tags in the same result set. There can be one to many InvoiceLineRet tags to each InvoiceRet tag.
    Any and all help is appreciated.
    Mike
    This works and returns RefNumber for the invoice at the InvoiceRet level.
    SELECT
    a.RefNumber
    FROM InvoiceQueryRs xt,
    XMLTable('//InvoiceRet' PASSING xt.OBJECT_VALUE COLUMNS
    RefNumber VARCHAR2(255) PATH 'RefNumber') a;
    This works and returns the two columns from the InvoiceLineRet level.
    SELECT
    b.ILR_ItemRef_FullName,
    b.ILR_Desc
    FROM InvoiceQueryRs xt,
    XMLTable('//InvoiceLineRet' PASSING xt.OBJECT_VALUE COLUMNS
    ILR_ItemRef_FullName VARCHAR2(255) PATH 'ItemRef/FullName',
    ILR_Desc VARCHAR2(2000) PATH 'Desc') b
    But a query like this does not work.
    SELECT
    b.RefNumber,
    b.ILR_ItemRef_FullName,
    b.ILR_Desc
    FROM InvoiceQueryRs xt,
    XMLTable('//InvoiceRet' PASSING xt.OBJECT_VALUE COLUMNS
    RefNumber VARCHAR2(255) PATH 'RefNumber',
    ILR_ItemRef_FullName VARCHAR2(255) PATH 'InvoiceLineRet/ItemRef/FullName',
    ILR_Desc VARCHAR2(2000) PATH 'InvoiceLineRet/Desc') b
    This query returns data but every row has the same RefNumber.
    SELECT
    a.RefNumber,
    b.ILR_ItemRef_ListID,
    b.ILR_ItemRef_FullName,
    b.ILR_Desc
    FROM InvoiceQueryRs xt,
    XMLTable('//InvoiceRet' PASSING xt.OBJECT_VALUE COLUMNS
    RefNumber VARCHAR2(255) PATH 'RefNumber') a,
    XMLTable('//InvoiceLineRet' PASSING xt.OBJECT_VALUE COLUMNS
    ILR_ItemRef_ListID VARCHAR2(255) PATH 'ItemRef/ListID',
    ILR_ItemRef_FullName VARCHAR2(255) PATH 'ItemRef/FullName',
    ILR_Desc VARCHAR2(2000) PATH 'Desc') b
    Example of the XML:
    <?xml version="1.0" encoding="utf-8"?>
    <!-- Created with Liquid XML Studio 1.0.8.0 (http://www.liquid-technologies.com) -->
    <TEST>
         <InvoiceRet>
              <TxnID>D924-1210085400</TxnID>
              <TimeCreated>2008-05-06T10:50:00-05:00</TimeCreated>
              <TimeModified>2008-07-21T10:54:42-05:00</TimeModified>
              <EditSequence>1215638595</EditSequence>
              <TxnNumber>10398</TxnNumber>
              <CustomerRef>
                   <ListID>80000278-1209483158</ListID>
                   <FullName>Majestic Entries</FullName>
              </CustomerRef>
              <ARAccountRef>
                   <ListID>80000009-1185470478</ListID>
                   <FullName>Accounts Receivable</FullName>
              </ARAccountRef>
              <TemplateRef>
                   <ListID>80000019-1190228214</ListID>
                   <FullName>Compudoc</FullName>
              </TemplateRef>
              <TxnDate>2008-05-06</TxnDate>
              <RefNumber>22333</RefNumber>
              <BillAddress>
                   <Addr1>Majetic Entries</Addr1>
              </BillAddress>
              <BillAddressBlock>
                   <Addr1>Majetic Entries</Addr1>
              </BillAddressBlock>
              <IsPending>false</IsPending>
              <IsFinanceCharge>false</IsFinanceCharge>
              <DueDate>2008-05-06</DueDate>
              <ShipDate>2008-05-06</ShipDate>
              <Subtotal>391.50</Subtotal>
              <ItemSalesTaxRef>
                   <ListID>8000004F-1185996977</ListID>
                   <FullName>NC 7.25%</FullName>
              </ItemSalesTaxRef>
              <SalesTaxPercentage>7.25</SalesTaxPercentage>
              <SalesTaxTotal>5.73</SalesTaxTotal>
              <AppliedAmount>-397.23</AppliedAmount>
              <BalanceRemaining>0.00</BalanceRemaining>
              <IsPaid>true</IsPaid>
              <IsToBePrinted>false</IsToBePrinted>
              <IsToBeEmailed>false</IsToBeEmailed>
              <CustomerSalesTaxCodeRef>
                   <ListID>80000001-1185469345</ListID>
                   <FullName>Tax</FullName>
              </CustomerSalesTaxCodeRef>
              <InvoiceLineRet>
                   <TxnLineID>D926-1210085400</TxnLineID>
                   <ItemRef>
                        <ListID>80000059-1199714336</ListID>
                        <FullName>Labor:Non-Contract Labor Ken</FullName>
                   </ItemRef>
                   <Desc>Technical Labor performed by Ken Allen:
    Network Problem with Internet and intranet found two routers connected together and the one set for DHCP was bad we changed out their bad one with our small netgear router.</Desc>
                   <Quantity>1.5</Quantity>
                   <Rate>125.00</Rate>
                   <ClassRef>
                        <ListID>8000000D-1200208143</ListID>
                        <FullName>KA</FullName>
                   </ClassRef>
                   <Amount>187.50</Amount>
                   <ServiceDate>2008-04-28</ServiceDate>
                   <SalesTaxCodeRef>
                        <ListID>80000002-1185469345</ListID>
                        <FullName>Non</FullName>
                   </SalesTaxCodeRef>
              </InvoiceLineRet>
              <InvoiceLineRet>
                   <TxnLineID>D927-1210085400</TxnLineID>
                   <ItemRef>
                        <ListID>80000029-1185470511</ListID>
                        <FullName>Labor:Non-Contract Labor Rick</FullName>
                   </ItemRef>
                   <Desc>Technical Labor performed by Rick Wagoner: Assisted with above troubleshooting</Desc>
                   <Quantity>1</Quantity>
                   <Rate>125.00</Rate>
                   <ClassRef>
                        <ListID>80000004-1185998300</ListID>
                        <FullName>RW</FullName>
                   </ClassRef>
                   <Amount>125.00</Amount>
                   <ServiceDate>2008-04-28</ServiceDate>
                   <SalesTaxCodeRef>
                        <ListID>80000002-1185469345</ListID>
                        <FullName>Non</FullName>
                   </SalesTaxCodeRef>
              </InvoiceLineRet>
              <InvoiceLineRet>
                   <TxnLineID>D928-1210085400</TxnLineID>
                   <ItemRef>
                        <ListID>80000050-1185997340</ListID>
                        <FullName>Parts and Supplies</FullName>
                   </ItemRef>
                   <Desc>Parts and Supplies: Netgear router</Desc>
                   <Quantity>1</Quantity>
                   <Rate>79.00</Rate>
                   <ClassRef>
                        <ListID>80000007-1186694551</ListID>
                        <FullName>Parts</FullName>
                   </ClassRef>
                   <Amount>79.00</Amount>
                   <SalesTaxCodeRef>
                        <ListID>80000001-1185469345</ListID>
                        <FullName>Tax</FullName>
                   </SalesTaxCodeRef>
              </InvoiceLineRet>
         </InvoiceRet>
         <InvoiceRet>
              <TxnID>ED59-1216758177</TxnID>
              <TimeCreated>2008-07-22T16:22:57-05:00</TimeCreated>
              <TimeModified>2008-07-26T11:21:48-05:00</TimeModified>
              <EditSequence>1217085708</EditSequence>
              <TxnNumber>11203</TxnNumber>
              <CustomerRef>
                   <ListID>80000278-1209483158</ListID>
                   <FullName>Majestic Entries</FullName>
              </CustomerRef>
              <ARAccountRef>
                   <ListID>80000009-1185470478</ListID>
                   <FullName>Accounts Receivable</FullName>
              </ARAccountRef>
              <TemplateRef>
                   <ListID>80000019-1190228214</ListID>
                   <FullName>Compudoc</FullName>
              </TemplateRef>
              <TxnDate>2008-07-22</TxnDate>
              <RefNumber>22479</RefNumber>
              <BillAddress>
                   <Addr1>Majetic Entries</Addr1>
              </BillAddress>
              <BillAddressBlock>
                   <Addr1>Majetic Entries</Addr1>
              </BillAddressBlock>
              <IsPending>false</IsPending>
              <IsFinanceCharge>false</IsFinanceCharge>
              <DueDate>2008-07-22</DueDate>
              <ShipDate>2008-07-22</ShipDate>
              <Subtotal>839.00</Subtotal>
              <ItemSalesTaxRef>
                   <ListID>8000004F-1185996977</ListID>
                   <FullName>NC 7.25%</FullName>
              </ItemSalesTaxRef>
              <SalesTaxPercentage>7.25</SalesTaxPercentage>
              <SalesTaxTotal>33.64</SalesTaxTotal>
              <AppliedAmount>0.00</AppliedAmount>
              <BalanceRemaining>872.64</BalanceRemaining>
              <IsPaid>false</IsPaid>
              <IsToBePrinted>true</IsToBePrinted>
              <IsToBeEmailed>false</IsToBeEmailed>
              <CustomerSalesTaxCodeRef>
                   <ListID>80000001-1185469345</ListID>
                   <FullName>Tax</FullName>
              </CustomerSalesTaxCodeRef>
              <InvoiceLineRet>
                   <TxnLineID>ED5B-1216758177</TxnLineID>
                   <ItemRef>
                        <ListID>80000050-1185997340</ListID>
                        <FullName>Parts and Supplies</FullName>
                   </ItemRef>
                   <Desc>Parts and Supplies - Linksys Router</Desc>
                   <Quantity>1</Quantity>
                   <Rate>89.00</Rate>
                   <Amount>89.00</Amount>
                   <SalesTaxCodeRef>
                        <ListID>80000001-1185469345</ListID>
                        <FullName>Tax</FullName>
                   </SalesTaxCodeRef>
              </InvoiceLineRet>
              <InvoiceLineRet>
                   <TxnLineID>ED5C-1216758177</TxnLineID>
                   <Desc>Suspect that the phone switch is attempting to act as a DHCP server for the network. per Terry, the reason that the phone switch was on the network was to supply VOIP to the warehouse phone lines. This was not working and is no longer needed. We removed the connection between the phone switch and the network.</Desc>
              </InvoiceLineRet>
              <InvoiceLineRet>
                   <TxnLineID>ED5D-1216758177</TxnLineID>
                   <Desc>Removed the Netgear router and the D-Link router. The D-Link had lost all settings and we could not log into the Netgear even after resetting to factory defaults.</Desc>
              </InvoiceLineRet>
              <InvoiceLineRet>
                   <TxnLineID>ED5E-1216758177</TxnLineID>
                   <Desc>Installed a new Lnksys router to replace the D-Link and Netgear faulty routers.</Desc>
              </InvoiceLineRet>
              <InvoiceLineRet>
                   <TxnLineID>ED5F-1216758177</TxnLineID>
                   <Desc>Ensured that all computers were connecting properly. Ensured that all computers printed to the Savin printer correctly.</Desc>
              </InvoiceLineRet>
              <InvoiceLineRet>
                   <TxnLineID>ED60-1216758177</TxnLineID>
                   <Desc>Worked with Time Warner Cable to resolve customer location and static IP.</Desc>
              </InvoiceLineRet>
              <InvoiceLineRet>
                   <TxnLineID>ED64-1216758177</TxnLineID>
                   <ItemRef>
                        <ListID>80000028-1185470511</ListID>
                        <FullName>Labor:Non-Contract Labor Kareem</FullName>
                   </ItemRef>
                   <Desc>Analyzed and resolved Internet connectivity problems after loss of service from Time Warner Cable.</Desc>
                   <Quantity>3</Quantity>
                   <Rate>125.00</Rate>
                   <Amount>375.00</Amount>
                   <ServiceDate>2008-07-22</ServiceDate>
                   <SalesTaxCodeRef>
                        <ListID>80000002-1185469345</ListID>
                        <FullName>Non</FullName>
                   </SalesTaxCodeRef>
              </InvoiceLineRet>
              <InvoiceLineRet>
                   <TxnLineID>ED68-1216758177</TxnLineID>
                   <ItemRef>
                        <ListID>8000005D-1216758445</ListID>
                        <FullName>Labor:Non-Contract Labor Mike</FullName>
                   </ItemRef>
                   <Desc>Analyzed and resolved Internet connectivity problems after loss of service from Time Warner Cable.</Desc>
                   <Quantity>3</Quantity>
                   <Rate>125.00</Rate>
                   <Amount>375.00</Amount>
                   <ServiceDate>2008-07-22</ServiceDate>
                   <SalesTaxCodeRef>
                        <ListID>80000001-1185469345</ListID>
                        <FullName>Tax</FullName>
                   </SalesTaxCodeRef>
              </InvoiceLineRet>
              <InvoiceLineRet>
                   <TxnLineID>ED94-1216758177</TxnLineID>
                   <Desc>Terry called, cannot connect to internet. Everyone but Terry can connect. Terry is getting a 172 IP address on his laptop. Walked him through putting a static IP on his laptop so that he could be functional. I went to their site and talked with the NEC phone switch management company. They said the switch does not have DHCP capabilities. I could not duplicate Terry's issue using my laptop. The phone switch is now totally disconnected from the network since the VOIP setup for the warehouse was not functional. Validated that the TWC modem is not DHCP.</Desc>
                   <ServiceDate>2008-07-23</ServiceDate>
              </InvoiceLineRet>
              <InvoiceLineRet>
                   <TxnLineID>ED95-1216758177</TxnLineID>
                   <Desc>Requires further diagnostics on Friday the 25th (if Terry is available) - need his laptop on-site to diagnose the problem.</Desc>
              </InvoiceLineRet>
              <InvoiceLineRet>
                   <TxnLineID>EE30-1216758177</TxnLineID>
                   <Desc>Communicated with Terry on 7/24/2008 via email. He is using DHCP and connecting correctly. Removing the final connection from the phone switch to the network appears to have corrected the problem.</Desc>
                   <ServiceDate>2008-07-24</ServiceDate>
              </InvoiceLineRet>
         </InvoiceRet>
    </TEST>

    Never mind. I figured it out.

  • Is there a simple way to retrieve the data from a resultset using JavaBean?

    I have a result set from a select * from users where userid = xxx statement. However, at the moment I have had to hard code the remainder of the code to get the data from each column as I need the column name as well as its data.
    I had read somewhere using java beans and reflection it is easier. But i do not know know how.
    Is there a simple way to retrieve the data from a result set ?
    thanks in advance-
    kg

    Well, it is not really simple. But there are Open Source components to simplify it for you. See e.g http://www.must.de/Jacompe.htm - de.must.dataobj.DataObject and its subclasses. Feel free to contact me if you have any questions: [email protected]

  • How to retrieve the data type of a column of a table?

    Hi,
    I want to retrieve the data type of a column of a table. At the moment I am querying "OCI_ATTR_DATA_TYPE" attribute but it is returning SQLT_CHR for both varchar2 and nvarchar2 data type columns. I need to distinguish between these two data types columns separately. Is there any API through which I could get the exact data type of a column i.e. "nvarchar2"?
    Thanks in advance.
    Hashim

    Hi,
    This is the Oracle C++ Call Interface (OCCI) forum - I'm not sure if you are using OCCI or OCI (Oracle Call Interface - the C interface) since you reference "OCI_ATTR_DATA_TYPE" which is more of an OCI focus than OCCI.
    In any case, you might take a look at "OCI_ATTR_CHARSET_FORM" which takes the following values:
    #define SQLCS_IMPLICIT 1     /* for CHAR, VARCHAR2, CLOB w/o a specified set */
    #define SQLCS_NCHAR    2                  /* for NCHAR, NCHAR VARYING, NCLOB */So, if you have a datatype of SQLT_CHR and OCI_ATTR_CHARSET_FORM is SQLCS_IMPLICIT then you have a varchar2 if it is SQLCS_NCHAR then you have an nvarchar2.
    If you are using OCCI and not OCI then take a look at MetaData::ATTR_DATA_TYPE and MetaData::ATTR_CHARSET_FORM which expose OCI_ATTR_DATA_TYPE and OCI_ATTR_CHARSET_FORM respectively.
    Perhaps that will get you what you want.
    Regards,
    Mark

  • How to retrieve the date of the itme's version using Ecmascript

    Hello, all
    I'd like to retrieve the date of minor and major versions using ecmascript. Here is my script so far.
    I am getting ID from query string in URL, then passing it to access file.
    What I don't understand is to how to instantiate Version class and loop through version to retrieve created date.
    Can someone help?
    <Sharepoint:ScriptLink name="SP.js" runat="server" OnDemand="true" localizable="false"/>
    <pre class="brush: javascript;">
    <script language="ecmascript" type="text/ecmascript">
    //Get ID of the document
    function getParameterByName(name) {
        name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
        var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
            results = regex.exec(location.search);
        return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
    var v_id = getParameterByName('ID');
    alert(v_id);
            var item;
            var list;
            var file;
            function fileMajorandMinorVersion() {
                var clientContext = SP.ClientContext.get_current();
                if (clientContext != undefined && clientContext != null) {
                    var webSite = clientContext.get_web();
                    this.list = webSite.get_lists().getByTitle("List Title");
                    this.item = list.getItemById(v_id);
                    this.file = this.item.get_file();
                    clientContext.load(this.file);
                    clientContext.executeQueryAsync(Function.createDelegate(this, this.OnLoadSuccess), Function.createDelegate(this, this.OnLoadFailed));
             function OnLoadSuccess(sender, args) {
                var version = "Major Version: " + this.file.get_majorVersion() + '\n' + "Minor Version: " + this.file.get_minorVersion();
                alert(version)
            function OnLoadFailed(sender, args) {
                alert('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace());
            </script>
    <input id="btnFileMajorandMinorVersion" onclick="fileMajorandMinorVersion()" type="button" value="File Major and Minor Version"/>
    vlad

    In order to loop through the version collection and display last version date here is the script that works for me:
    <Sharepoint:ScriptLink name="SP.js" runat="server" OnDemand="true" localizable="false"/>
    <script language="ecmascript" type="text/ecmascript">
    //Get ID of the document
    function getParameterByName(name) {
        name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
        var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
            results = regex.exec(location.search);
        return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
    var v_id = getParameterByName('ID');
    function convertShortDate(par_date) {
       var var_date = new Date(par_date);
       var day = var_date.getDate();
       var month = var_date.getMonth() + 1;
       var year = var_date.getFullYear();
       var result_date = month+'/'+day+'/'+year;
       return result_date;
            var item;
            var list;
            var file;
            var versions;
            var _version;
            function set_LastCertDate() {
                var clientContext = SP.ClientContext.get_current();
                if (clientContext != undefined && clientContext != null) {
                    var webSite = clientContext.get_web();
                    this.list = webSite.get_lists().getByTitle("Archer Pages");
                    this.item = list.getItemById(v_id);
                    this.file = this.item.get_file();
                    this.versions = this.file.get_versions()               
                    clientContext.load(this.file);
                    clientContext.load(this.versions)
                    clientContext.executeQueryAsync(Function.createDelegate(this, this.OnLoadSuccess), Function.createDelegate(this, this.OnLoadFailed));
             function OnLoadSuccess(sender, args) {
             var output = "";
             var certdate = "";
             var listItemEnumerator = this.versions.getEnumerator();
             // loop through the version items
             while (listItemEnumerator.moveNext())
              var oVersionItem = listItemEnumerator.get_current();
              certdate = oVersionItem.get_created();
              $("input[title='CertificateDate']").val(convertShortDate(certdate));
            function OnLoadFailed(sender, args) {
                alert('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace());
           document.write("<input name='Button1' type='button' value='Populate Certificate Date' onclick='set_LastCertDate()'/>");
        </script>
    vlad

  • How to retrieve the data stored in BLOB field in MySql using java?

    Hi all!
    i stored a file content into the MySql database in BLOB field.
    and i now want retrieve the data......
    Please help me out in doing the task...........
    Thanx...........

    Thrisha..
    When u get a result set u can have rs.getBlob() function that will give u a BLOB object that can be captured using Blob interface of javax.sql package...
    Blob interface has getBinaryStream, getBytes etc as functions...
    i think i cleared u
    regards
    Shanu

  • Query to get the hierarchical results

    Hi,
    Please help me in writing a Query to get the hierarchical results. I want a result like follows...
    course-----groupname---TotalMembers---NotStarted---INProgress---Completed
    Course1---country1--------12---------------6----------3-------------3
    Course1-----state11-------12---------------6----------3-------------3
    Course1------District111--10---------------5----------0-------------0
    Course1--------City1111----0---------------0----------0-------------0
    Course1--------City1112----1---------------0----------0-------------1
    Course1--------City1113----6---------------3----------2-------------1
    Course1---country2--------12---------------6----------3-------------3
    Course1----state21--------12---------------6----------3-------------3
    Course1------District211--10---------------5----------0-------------0
    Course1--------City2111----0---------------0----------0-------------0
    Course1--------City2112----1---------------0----------0-------------1
    Course1--------City2113----6---------------3----------2-------------1
    Course2---country1--------12---------------6----------2-------------3
    Course2----state11--------12---------------6----------2-------------3
    Course2------District111--10---------------5----------0-------------0
    Course2--------City1111----0---------------0----------0-------------0
    Course2--------City1112----1---------------0----------0-------------1
    Course2--------City1113----6---------------3----------1-------------2
    Course2---country2--------12---------------6----------3-------------3
    Course2-----state21-------12---------------6----------3-------------3
    Course2------District211--10---------------5----------0-------------0
    Course2--------City2111----0---------------0----------0-------------0
    Course2--------City2112----1---------------0----------0-------------1
    Course2--------City2113----6---------------3----------2-------------1
    These are the Tables available to me.
    (I have just given some examle data in tables, to get the idea)
    "Groups" Table (This table gives the information of the group)
    GROUPID-----NAME-------PARENTID
    1---------Universe--------1
    2---------country1--------1
    3---------state11---------2
    4---------District111-----3
    5---------City1111--------4
    6---------City1112--------4
    7---------City1113--------4
    8---------country2--------1
    9---------state21---------8
    10--------District211-----9
    11--------City2111--------10
    12--------City2112--------10
    13--------City2113--------10
    "Users" Table (This table provides the user information)
    userID----FIRSTNAME---LASTNAME
    user1-----------Jim-------Carry
    user2-----------Tom-------lee
    user3-----------sunny-----boo
    user4-----------mary------mall
    "User-Group" Tables (This table provides the relation between the groups
    and the members)
    GROUPID---userID
    3-------------user1
    3-------------user2
    3-------------user4
    4-------------user5
    5-------------user6
    5-------------user7
    user_score (This table provides the user scores of different courses)
    USERID----course-----STATUS
    user1------course1-----complete
    user1------course2-----NotStarted
    user2------course1-----NotStarted
    user2------course2-----complete
    user3------course1-----complete
    user3------course2-----InProgress
    user4------course2-----complete
    user4------course1-----NotStarted
    I will explain the first four lines of the above result.
    Course1---country1--------12---------------6----------4-------------2
    Course1-----state11-------12---------------6----------4-------------2
    Course1------District111--10---------------5----------3-------------2
    Course1--------City1111----0---------------0----------0-------------0
    Course1--------City1112----1---------------0----------0-------------1
    Course1--------City1113----6---------------3----------2-------------1
    # "city1111" group has 0 members
    # "city1112" group has 1 member (1 member completed the course1)
    # "city1113" group has 6 members(3 members notStarted,2 members
    InProgress,1 member completed the course1)
    # "District111" is the parent group of above three groups, and has 3
    members.(2 members NotStarted,1 member InProgress the course1). But this
    group has child groups, so the scores of this group has to rollup the
    child groups scores also. Thats why it has 2+3+0+0=6 members Not
    Started,1+2+0+0=3 members InProgress,0+0+1+1=2 members completed.
    # "state11" group also same as the above group.
    I am able to get the group hierarchy by using "Connect By" like follows
    "select name,groupid,parentid from groups_info start with groupid=1 connect by parentid = prior groupid;"
    But i want to get the result as i have mentioned in the begining of this discussion.
    I am using oracle 8i (oracle8.1.7).
    Thank you for any help
    Srinivas M

    This may not be exactly what you want,
    but it should be fairly close:
    SET      LINESIZE 100
    SET      PAGESIZE 24
    COLUMN   groupname FORMAT A20
    SELECT   INITCAP (user_score.course) "course",
             groupnames.name "groupname",
             COUNT (*) "TotalMembers",
             SUM (NVL (DECODE (UPPER (user_score.status), 'NOTSTARTED', 1), 0)) "NotStarted",
             SUM (NVL (DECODE (UPPER (user_score.status), 'INPROGRESS', 1), 0)) "InProgress",
             SUM (NVL (DECODE (UPPER (user_score.status), 'COMPLETE', 1), 0)) "Completed"
    FROM     user_score,
             user_group,
             (SELECT ROWNUM rn,
                     name,
                     groupid
              FROM   (SELECT     LPAD (' ', 2 * LEVEL - 2) || name AS name,
                                 groupid
                      FROM       groups
                      START WITH groupid = 1
                      CONNECT BY PRIOR groupid = parentid)) groupnames
    WHERE    user_score.userid = user_group.userid
    AND      user_group.groupid IN
             (SELECT     groupid
              FROM       groups
              START WITH groupid = groupnames.groupid
              CONNECT BY PRIOR groupid = parentid)
    GROUP BY user_score.course, groupnames.name, groupnames.rn
    ORDER BY user_score.course, groupnames.rn
    I entered the minimal test data that you
    provided and a bit more and got this result
    (It was formatted as you requested,
    but I don't know if it will display properly
    on this post, or wrap around):
    course  groupname            TotalMembers NotStarted InProgress  Completed
    Course1 Universe                        6          2          0          4
    Course1   country1                      5          2          0          3
    Course1     state11                     5          2          0          3
    Course1       District111               2          0          0          2
    Course1         City1112                1          0          0          1
    Course1         City1113                1          0          0          1
    Course1   country2                      1          0          0          1
    Course1     state21                     1          0          0          1
    Course1       District211               1          0          0          1
    Course1         City2113                1          0          0          1
    Course2 Universe                        5          1          1          3
    Course2   country1                      4          1          1          2
    Course2     state11                     4          1          1          2
    Course2       District111               1          0          1          0
    Course2         City1113                1          0          1          0
    Course2   country2                      1          0          0          1
    Course2     state21                     1          0          0          1
    Course2       District211               1          0          0          1
    Course2         City2113                1          0          0          1
    Here is the test data that I used, in case
    anyone else wants to play with it:
    create table groups
      (groupid  number,
       name     varchar2(15),
       parentid number)
    insert into groups
    values (1,'Universe',null)
    insert into groups
    values (2,'country1',1)
    insert into groups
    values (3,'state11',2)
    insert into groups
    values (4,'District111',3)
    insert into groups
    values (5,'City1111',4)
    insert into groups
    values (6,'City1112',4)
    insert into groups
    values (7,'City1113',4)
    insert into groups
    values (8,'country2',1)
    insert into groups
    values (9,'state21',8)
    insert into groups
    values (10,'District211',9)
    insert into groups
    values (11,'City2111',10)
    insert into groups
    values (12,'City2112',10)
    insert into groups
    values (13,'City2113',10)
    create table user_group
      (groupid number,
       userid  varchar2(5))
    insert into user_group
    values (3,'user1')
    insert into user_group
    values (3,'user2')
    insert into user_group
    values (3,'user4')
    insert into user_group
    values (4,'user5')
    insert into user_group
    values (5,'user6')
    insert into user_group
    values (5,'user7')
    insert into user_group
    values (7,'user8')
    insert into user_group
    values (13,'user9')
    insert into user_group
    values (11,'use11')
    insert into user_group
    values (6,'use6')
    create table user_score
      (userid varchar2(5),
       course varchar2(7),
       status varchar2(10))
    insert into user_score
    values ('use6','course1','complete')
    insert into user_score
    values ('user9','course1','complete')
    insert into user_score
    values ('user9','course2','complete')
    insert into user_score
    values ('user8','course1','complete')
    insert into user_score
    values ('user8','course2','InProgress')
    insert into user_score
    values ('user1','course1','complete')
    insert into user_score
    values ('user1','course2','NotStarted')
    insert into user_score
    values ('user2','course1','NotStarted')
    insert into user_score
    values ('user2','course2','complete')
    insert into user_score
    values ('user3','course1','complete')
    insert into user_score
    values ('user3','course2','InProgress')
    insert into user_score
    values ('user4','course2','complete')
    insert into user_score
    values ('user4','course1','NotStarted')

  • Interactive Reporting - Chg Query from Using Table to Result Set w/ same Co

    Currently I have a query that uses an Oracle table. I would like to change the query to use the result set of another query wh/ contains the same information & column names (however, since I am creating the results from scratch, I don't have to wait for the Oracle table to be updated). Is there a way to do this change w/o IR automatically removing the column names from the results and then making me go back into each result set and re-adding them, formatting them, etc. For example, the query currently uses a table called Defect_History, wh/ has columns bug_id, application, sub-app, etc. This table is not updated on a daily basis, so I have created a new query wh/ goes against the source tables used in creating the Defect_History table and puts the latest information into an IR result set. Is there a way to change the current queries that use the Defect_History table to use the IR result set instead w/o basically recreating each of the subsequent queries? I have gone into Dashboard Studio Optimize Utility, but the queries show as using Data Model, Data Model2, etc as the Parent and I am not able to make changes to it.
    Thanks.
    Terri

    I am in the Dashboard Studio - Optimize Utility. When I select that report (or any of the others), the Reparent button is grayed out on the toolbar. I've also tried right-clicking on the report and it's grayed out there as well. Any ideas?

  • AF Query: Criteria fields disappearing but result set not refreshed

    I have been searching for days and cannot find a solution to this problem. I have an af:query component based on a view criteria. I have the query component only displayed as an advanced search without the basic/advanced toggle. A user can then use "Add Fields" and filter down their result set. Now whenever the user navigates away from that page and returns the filtered result set remains, but the list of fields that the user added to filter on are missing, i.e.
    Search Box
    Field1 is not blank
    Navigate away and return
    Search Box
    blank; nothing listed here, but result set is still filtered for Field1 not blank.
    The only thing the customer can do is add a bogus field, and then click reset to return the entire result set.
    If anyone can help with this problem, I would greatly appreciate it. I am using:
    JDeveloper 11.1.1.4
    Oracle 11g
    Weblogic 10.3
    Thanks,
    Michelle

    Actually, in researching another problem, I think this is either a problem with jheadstart or with .jsff pages. I created a test case for a different problem that I posted to metalink and in this I did not use jheadstart and I used just a single .jspx page with a panel tabbed layout. The problem does not occur here, so one of the 2 is causing my problem, now the question is which.
    Thanks for your help,
    Michelle

Maybe you are looking for