extract data from XMLType using vbscript on OleDB?

Hello.

We have a problem where the XMLType column data to get in 11.2.0.1 on Windows x 64 worked very well, but we have moved to 11.2.0.3 Patch 21 and the column type changed to binary storage default, and we started to do read errors when the data was greater than 32 k (or so it seems).

I opened a SR, and Oracle support sent me a VB script to test playback of the table on OleDB.  However, their script doesn't seem to work as announced, so after a lot of gooling, came to us with the following to read a column of xmltype - not the same table, just to test that the vbscript works:

REM need to re-register the dll OLEDB as there is a problem with the oracle client and the dll registration

REM start following an administrator command prompt

REM regsvr32.exe c:\Users\finite9\oracle\product\11.2.0\client_2\bin\oraoledb11.dll

the con value = createobject ("adodb.connection")

con. Open "provider = oraoledb.oracle; user id = finite9; password = password1; data source = TSTDB ".

Set rs = createobject ("adodb.recordset")

RS. Open 'select SW_REPLY changedate', con

While not on the place. EXPRESSIONS OF FOLKLORE

MsgBox rs. Fields ("ChangeDate"). Value

RS. MoveNext

Wend

RS. Close

Set rs = nothing

con. Close

the value con = nothing

This works perfectly and displays 12 rows in this column in a vbscript dialog box, but I am not able to do to extract the XMLType column clob data.  I try with for example. RS. Open 'select REPLYDATA.getclobval () from SW_REPLY', stupid but just get errors.

Is it possible to extract data from XMLType on OleDB with vbscript?  It cannot be OleDB itself which poses problem, because it has worked in our application and 11.2.0.1 although with < 32 k of data.  But it would be nice to have a working test case while we were able to test out our app.  If it is with vbscript or c# is irrelevant.

ignore the message, it is possible.  Support of Oracle gave me this:

the con value = createobject ("adodb.connection")

con. Open "provider = oraoledb.oracle; user id = finite9; password = password1; data source = DEVTST ".

Set rs = createobject ("adodb.recordset")

RS. Open "select t.REPLYDATA.getclobval () as xmltestdata OF SW_REPLY t", con

While not on the place. EXPRESSIONS OF FOLKLORE

MsgBox rs. Fields ("xmltestdata"). Value

RS. MoveNext

Wend

RS. Close

Set rs = nothing

con. Close

the value con = nothing

but there is a problem when xmldata exceeds a certain size.  small starters work well if.

Tags: Database

Similar Questions

  • Extract data from database using php script and entry for datagrid.

    Hi all

    I intend to use the php script below to extract data from a database.

    I want to then display it in a datagrid control, the datagrid control has Ref columns job, the company and the position.

    The php script I have is

    <? PHP
    $hostname_conn = "localhost";
    $username_conn = "";
    $password_conn = "";

    $conn = mysql_connect ($hostname_conn, $username_conn, $password_conn);

    @mysql_select_db ("videochat");

    $query = "SELECT * FROM work."

    $result = mysql_query ($query);

    $row = mysql_fetch_array ($result);

    $ref = $row ["jobref"];
    $company = $row ['company'];
    $position = $row ["position"];

    echo "< Ref > $ref < / Ref >";
    echo "< company > $company < / company > ';
    echo "< location > $position < / location >."

    ? >

    Could someone show me how I chuck this data in a grid?

    Thank you

    Hello

    You should start using the authority, either zendamf which is used by the data wizards in flashbuilder 4 or with amfphp which is probably better than zend but has not all nicities such as the creation of objects of value.

    http://flashhub.NET/filter/

    This project uses amfphp, basically, it uses remoteobjects so returned php is in a ready to put directly into a grid or a datagroup arraycollection collection.

    If you need help with this sort of thing PM me and I can do a login session...

    the PHP services for calls used in the application

    <>

    class pets

    {

    var $db_host = "localhost";

    var $db_name = "flashhub_pets";

    var $db_user = "flashhub_david";

    var $db_pwd = "david";

    function pets()

    {

    Define the methodTable for this class in the constructor

    $this-> methodTable = array)

    "getPets"-online (table)

    'description' => 'Pets, database',

    'access' => 'remote '.

    )

    );

    }

    function getAllPets()

    {

    $mysql = mysql_connect ($this-> $this-> db_user, db_host), $this-> db_pwd;

    @mysql_select_db ($this-> db_name);

    $Query = "SELECT * from pet;

    $Result = mysql_query ($Query);

    return ($Result);

    }

    function getTypeOfPets ($category)

    {

    $mysql = mysql_connect ($this-> $this-> db_user, db_host), $this-> db_pwd;

    @mysql_select_db ($this-> db_name);

    $Query = "SELECT * from pet where CATEGORY = $category;

    $Result = mysql_query ($Query);

    return ($Result);

    }

    function getCategories()

    {

    $mysql = mysql_connect ($this-> $this-> db_user, db_host), $this-> db_pwd;

    @mysql_select_db ($this-> db_name);

    $Query = "SELECT * from category";

    $Result = mysql_query ($Query);

    return ($Result);

    }

    }

    ?>

    David

  • Extracting data from table using the date condition

    Hello

    I have a table structure and data as below.

    create table of production
    (
    IPC VARCHAR2 (200),
    PRODUCTIONDATE VARCHAR2 (200),
    QUANTITY VARCHAR2 (2000).
    PRODUCTIONCODE VARCHAR2 (2000).
    MOULDQUANTITY VARCHAR2 (2000));

    Insert into production
    values ('1111 ', '20121119', ' 1023', 'AAB77',' 0002');

    Insert into production
    values ('1111 ', '20121122', ' 1023', 'AAB77',' 0002');

    Insert into production
    values ('1111 ', '20121126', ' 1023', 'AAB77',' 0002');

    Insert into production
    values ('1111 ', '20121127', ' 1023', 'AAB77',' 0002');

    Insert into production
    values ('1111 ', '20121128', ' 1023', 'AAB77',' 0002');

    Insert into production
    values ('1111 ', '20121201', ' 1023', 'AAB77',' 0002');

    Insert into production
    values ('1111 ', '20121203', ' 1023', 'AAB77',' 0002');

    Insert into production
    values ('1111 ', '20121203', ' 1023', 'AAB77',' 0002');

    Insert into production
    values ('1111 ', '20130103', ' 1023', 'AAB77',' 0002');

    Insert into production
    values ('1111 ', '20130104', ' 1023', 'AAB77',' 0002');

    Insert into production
    values ('1111 ', '20130105', ' 1023', 'AAB77',' 0002');


    Now, here I want to extract the data with condition as

    PRODUCTIONDATE > = the current week Monday

    so I would skip only two first rows and will need to get all the lines.

    I tried to use it under condition, but it would not give the data for the values of 2013.

    TO_NUMBER (to_char (to_date (PRODUCTIONDATE, 'yyyymmdd'), 'IW')) > = to_number (to_char (sysdate, 'IW'))

    Any help would be appreciated.

    Thank you
    Mahesh

    Hello

    HM wrote:
    by the way: it is generally a good idea to store date values in date columns.

    One of the many reasons why store date information in VARCHAR2 columns (especially VARCHAR2 (200)) is a bad idea, it's that the data invalid get there, causing errors. Avoid the conversion of columns like that at times, if possible:

    SELECT     *
    FROM     production
    WHERE     productiondate     >= TO_CHAR ( TRUNC (SYSDATE, 'IW')
                              , 'YYYYMMDD'
                           )
    ;
    
  • ODI extract data from HFM using hierarchies / members whose list of filters

    Hi all

    is it possible to use lists of members or hierarchies from account to account and filter data HFM LKM to SQL entity?

    In the example:

    ACCOUNT_FILTER = AccList (where AccList is a list)

    or

    ACCOUNT_FILTER = AccX. * (where the CAC is a parent account and we want that all his children)

    ODI, Version 10.1.3.6.5

    Thank you

    I don't think it's possible, you must provide a list of the accounts comma separated values

  • Extract data from EO using findbyprimarykey

    I'm having some difficulty trying to retrieve a line of the EO. My case, I have a table (with CodeType as primary key) ParamSetup defined as ParamSetupEO in the entity objects and ParamSetupVO objects in view.

    I've implemented the findbyprimarykey in the module of the application. The code snippet looks like this:

    public ParamSetupEOImpl FindandRetrieveParameter (String vcodeType) {}

    ParamDef EntityDefImpl = ParamSetupEOImpl.getDefinitionObject ();

    Create the Key object

    Key paramKey = ParamSetupEOImpl.createPrimaryKey (vcodeType);

    Find and return the desired instance

    return (ParamSetupEOImpl) paramDef.findByPrimaryKey (getDBTransaction (), paramKey);

    }

    My problem is how to make reference to it in a managedbean. Here's how to move to parameter (vcodeType) and how to reference each column (attribute)

    For example, you can use a display criteria where you only use the pk as the criteria field.  In a method in the original version, you apply the display criteria, run the query and return the line you get, which can be either the line for the pk, or null if no row could be found using this key. For an example of how to do this check http://adfpractice-fedor.blogspot.de/2011/08/how-to-apply-view-criteria.html

    Instead of return void, your method returns a line

    public line applySalaryCriteria (salary number) {}

    setsalary (salary);

    setApplyViewCriteriaName ("SalaryCriteria");

    executeQuery();

    This.first () return;

    }

    Timo

  • How to ETL extract data from database Oracle 11.1 using Cognos Data Manager 10.1

    Hello

    I need to run the IBM Cognos Data Manager 10.1 version ETL tool for extracting data from the Oracle11.1 database.

    My understanding is that, from the point of view of database, the best way would to have a stored procedure that will provide a reference cursor in the ETL client tool.

    However, a database procedure the ETL tool running seems not to be possible in this version of the data manager.

    If someone has done this before? What is the best way for this snippet to do?

    Thank you

    Emilija

    Annabelle says:

    My reading of original question: "What is the best way for this snippet to do?"

    Sorry - is NOT helping.

    The BEST way to extract data from a table is to use a SELECT statement.

    You said you want to do.

    So just repeat your original question instead of those that ask you to answer will not move forward us.

  • Query to extract data from source DB driver using process mapping pre...

    Hi all
    I have a source for the query to retrieve the data from the source database. Looking for suggestion what could be the best approach to extract data from the source database.using owb 11 GR 1 material.
    I'm in printing, create the process of mapping driver prerequisite for aid to perform immediate with Create table T1 as a sql query. Petition to the sides of the Insert into T1 Select * from Source_Table in the different database.

    Certainly, need to create Db users in the Source database, to get privileges to read the data of source_database.
    Is - this good aproach to or of any other alternative to achieve this.

    Means, create the table in the transit area (desired area, where I am) and using driver mapping process before you run the select query to retrieve data from a data source.

    Would apreciate your previous answer.
    Thank you
    MAK

    You can mark Correct or useful if it solves your purpose.

  • Extracting data from table without refreshment and without using the tab key.

    Hi friends,

    I have a problem I want to extract data from table without discount in the text field without using the Tab key. When I enter a field value any value then the text corressponding should enter into corressponding textfield without using the Tab key.

    for example. When I get back emp_id 101 in a text field then first_name and last_name, address would come in to the text fields corressponding without refresh and use the Tab key.

    How can I do that.

    Thank you
    Maury

    Hi Maury,

    I guess it's similar to: retrieving data without refreshing rather than Re: value of a textfield should enter into an another textfield without using the TAB ?

    If so, the only change you want to bring on the first is to use the parameter "Onkeyup" instead of "onchange" in the 'HTML Form attributes of the element' element.

    Note, however, that the user must move away from the issue at some point (for example, to click on a button), so the onchange will fire anyway.

    Andy

  • I want to extract data from a PDF using Java

    I would prefer to extract data from a PDF file and convert them to XML. Is there an API that allows to convert a PDF to an Adobe XML format? Ideally, I would like to add a few JAR files to my classpath, similar to PDFBox. I don't want to install a bunch of components side server or something like that.

    Thank you!

    Then Adobe does not offer a solution that meets your needs - sorry.

    Our solution on the server side is our LiveCycle product family which, however, includes a collection of Java APIs.

  • How to extract data from SAP and COBOL using ODI

    Hi people,

    Can you please let me know the procedures in ODI to extract data from SAP and COBOL?

    Thank you all for the help.

    Hello

    You can download the Patch 8571830 to Oracle metalink.

    It has a new technology 'SAP ABAP' and KMs to extract and load data-
    RKM SAP ERP and SAP to Oracle ERP LKM.

    Thank you

  • 1074118649 error occurred at niUSRP extract data from Rx (2D CBD) .vi

    Hello

    When I was trying the example of the USRP OR which is "niUSRP EX Rx synchronized to multiple entries (MIMO Expansion)", a mistake is released which is

    1074118649 error occurred at niUSRP extract data from Rx (2D CBD) .vi

    A workflow command has been issued in the past.

    can anyboay help me solve the problem?

    Thank you very much

    Andy

    Hi andy,.

    what you need to do is reversing the Oder river where the screw niUSRP the value Time.vi and niUSRP Trigger.vi configure a1.1ppear. Time of first setting then set up trigger. The example works correctly with version 1.1, since you are using version 1.2, that changes must be made.

    In the example, you can set the clock to standard time (start time = 0) even if you had already triggered the reception. Thus, samples received will be acquired with time stamp later where the error.

    Best regards

  • Extract data from graph XY

    Hello

    Here, I want to extract data from the XY graph. I joined vi which I use for table 1 d. How can I use this for 2D table VI.

    Thank you

    Hi Alex,

    You can use the same approach.

    The only thing that changes is the function ArraySubset in its adaptation to the 2D matrix. You can select rows or clumns of your data (depending on how you have generated them)...

  • How to extract data from a signed pdf that was sent to me.

    I can extract data from a PDF file that is not signed, but how to extract data from a signed PDF? Exporting data option does not work once it is signed. Specifically, I want to combine the data into a csv file, but a PDF signed does not to me.

    Hi evanb92625060,

    It is not possible to extract (using Acrobat |) Collection and management of the PDF to form data) data from a signed PDF form is that it locks all fields in the form.

    Kind regards
    Nicos

  • Extract data from form DPS 2015?

    I have a registration form with some fields such as name, email etc. identification and a "submit" button.

    Here are a few questions about this:

    1. can I create a form with fields (name, e-mail id) in 2015 DPS.

    2. If so, how can retrieve us the data from the form after submission. Is there an API to extract data from form of DPS 2015?

    3. where we store the data? Can it be stored in the AEM or DPS?

    Appreciate your suggestions and help.

    Hi Kalyan,

    It's nothing built in DPS to do this, however you can use the HTML articles for this feature. You will need to write JavaScript code to handle the #2 and #3 elements. It is up to you to decide where you want to store the information collected. Usually you get shipped back through a Web service to a site or a database, you manage.

    Neil

  • Extract data from Oracle into excel file

    Hello

    I have a requirement where in I need to extract data from Oracle into excel file and the worksheet excel name should be 'given '.
    for example. Excel 'AR Data_DDMMYY' file name and the name of the "Data" sheet excel

    I used the UTL_FILE API to extract the data delimited by tabs that you can open in excel, but it's not exactly an excel file as the name of the worksheet is the same as the name of the file.

    I tried to use utl_file.fcopy and frename.

    Is it possible to do it using PLSQL?

    Select * from version of v$.
    Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bi
    PL/SQL Release 10.2.0.5.0 - Production
    "CORE     10.2.0.5.0     Production"
    TNS for HPUX: Version 10.2.0.5.0 - Production
    NLSRTL Version 10.2.0.5.0 - Production
    Example Code:
    declare
    cursor c is
    select * from scott.emp;
    v varchar2(100);
    f utl_file.file_type;
    
    file_name varchar2(100) := 'AR Data.xls';
    dir varchar2(50) := 'CESDIR191710';
    
    --select * from dba_directories
    
    begin
    
    
    f := utl_file.fopen(dir, file_name, 'W');
    
    v := 'EMPNO'||chr(9)||'ENAME'||chr(9)||'JOB'||chr(9)||'SAL'||chr(9)||'HIREDATE'||chr(9)||'DEPTNO';
    utl_file.put_line(f, v);
    
    for i in c
    loop
    
    v := i.empno||chr(9)||i.ename||chr(9)||i.job||chr(9)||i.sal||chr(9)||i.hiredate||chr(9)||i.deptno;
    utl_file.put_line(f, v);
    
    end loop;
    utl_file.fclose(f);
    
    --utl_file.frename(dir, file_name, dir, replace(file_name, '.xls', '_')||to_char(sysdate, 'MMDDYY')||'.xls', false);
    utl_file.fcopy(dir, file_name, dir, replace(file_name, '.xls', '_')||to_char(sysdate, 'MMDDYY')||'.xls');
    
    end;
    Thank you
    Imran

    Hello

    I tried to change the .xlsx to .xls and it gives a note at the opening of the file "the file you are trying to open, abc.xls, is in a different format that it is specified by the file extension. Check that the file is not corrupted and precedes from a trusted source before you open the file. Do you want to open it now? »

    When you rename the file does not solve your problem.
    Anton Scheffer package generates a file in format xlsx Office 2010. When rename you it with the .xls extension, then Office 2010 will give you the warning that the file format does not match the extension.

    but the requirement has to generate excel 2003 file.

    The xml_spreadsheet package writes a format that was introduced with Office 2003, but you must use .xml as extension in other Office 2010 will give you the same caveat.
    To write the real xls version (binary), you can use Apache POI. You will need to import Java classes in your db and write a PL/SQL wrapper. Or you can use one of the options above, writing the output to a windows server and then use Excel to open and save in the required format.

    You must decide whether it is easier to write the binary xls format or to convince the customer to accept other formats that can be opened with Excel.

    Concerning
    Marcus

Maybe you are looking for

  • ITunes backup password forgotten

    Hi, I set up my password for iphone cripting back two months and I know didn't realize that this password it on when I do my back upwards. And there is a problem that I don't remember the password and I already delete all contacts from my old phone i

  • Satellite Pro P200-15W: after Bios Update 1.90 incredibly noisy fan

    Hi, I have a Toshiba Satellite Pro P200-15W, I recently made an update to BIOS version 1.9 and seems to have been a big mistake.After restarting the computer, I had a lot of software deconfig and the fan has become incredibly noisy. I have the proble

  • HP laptop - 15-ac026tx: RAM UPGRADE

    I have 4 GB of RAM installed. I need to update my RAM. What is the maximum capacity that can hold my laptop and how many slots is there?

  • power on password of the g7

    My code is 67306001. Help, please

  • Program for the blackBerry Smartphones Office Compatibility

    I had to wipe my computer and consequently lost everything on it.  I do not have the disks provided with the phone (as numbers) and let me know what version of the desktop software is compatible with my phone.  The program on the phone is v4.2.1.96 a