LONG datatype and ADO

How LONG column value could be retrieved in ADO ?
I am using OLE DB provider v. 9.2.0.2 and it returns only first 100 symbols when using Value property of Field object or GetChunk method.
Thanks

By default, ChunkSize is set to 100 bytes. You may set this property to a value between 1 and 65535 in your Connection string or registry under OLEDB subkey.
for example, ChunkSize=65535
Details as the OraOLEDB doc.

Similar Messages

  • LONG Datatypes and Designer6

    I have an Oracle 7.3.4.4.0 database and am using Designer 6.0.3.4.0.
    I have a number of LONG fields within my database. And it appears that I'm having some troubles with the Web Modules that I'm developing. The PL/SQL code that Designer generates blows up when the text that is going into these fields is greater than 4k in size. I keep getting the "ORA-06502: PL/SQL: numeric or value error" message when the size of the text is > 4096 bytes.
    Has anyone seen this or heard anything about it? Anything that I can do?

    JayjayQ wrote:
    Hello I just recently successfully upgraded to leopard and everything seems like it's running fine but one thing i noticed is that it seems that leopard takes longer to startup. I also find that when I try to log out the beach ball rolls forever and the computer doesn't do anything. Has anyone else experienced this and how can I improve the performance?
    Someone just pointed out that the startup problem can be related to items in your startup folder.
    Under System->Accounts->Login Items see what's there. If you remove anything, remember what it was.

  • Sql syntax for converting a long datatype value in to a integer datatype value

    I have to make a sql query where in i have a value of long datatype and i want to convert it into integer datatype value
    null

    It would have helped if you could have posted sample data.
    now my requirement is to calculate the difference in hours between the start time and end time.Assuming you want the difference in time irrespective of the dates and the time is stored like HH24:MI:SS format, you could try something like:
    SQL> WITH test_tab AS
      2       (SELECT '09:12:33' start_time, '12:30:33' end_time
      3          FROM DUAL
      4        UNION ALL
      5        SELECT '09:12:33' start_time, '14:12:33' end_time
      6          FROM DUAL)
      7        -- end of test data
      8  SELECT end_time, start_time,
      9         TRUNC (  (  TO_DATE (end_time, 'HH24:MI:SS')
    10                   - TO_DATE (start_time, 'HH24:MI:SS')
    11                  )
    12                * 24
    13               ) diff_in_hours
    14    FROM test_tab
    15  /
    END_TIME START_TI DIFF_IN_HOURS
    12:30:33 09:12:33             3
    14:12:33 09:12:33             5
    2 rows selected.Hope this helps,
    Regards,
    Jo

  • HS generic and long datatypes in Oracle 8i

    I have a problem importing LONG datatype columns
    from Hyperion Pillar to Oracle (version 8.1.6.0.0) using
    the (Hyperion supplied) ODBC driver and generic HS.
    The error message I get is
    ORA-03001: unimplemented feature
    ORA-02063: preceding line from PILLAR.WORLD
    From the message it seems clear that Oracle cannot
    deal with longs using generic connectivity (at least
    in v. 8.1.6).
    My questions:
    1) Is there a workaround ?
    2) Does this work in 9i ?
    Notes:
    1) The problem is not with the ODBC driver, as I
    can see the long datatype columns using another
    tool which connects to Pillar via ODBC.
    2) HS has been set up correctly because all datatypes
    other than long can be viewed in Oracle without any
    problems.
    3) Operating System: Windows NT 4.00.1381
    Any help would be much appreciated!
    Kailash.

    Thanks for the reply.
    Pillar LONGS (or MEMO, as they are referred to in Pillar)
    map to ODBC SQL_LONGVARCHAR. So it appears that the
    mapping is OK, and that SELECTing from these columns
    should be possible via generic connectivity.
    Any other ideas on what may be wrong? Any help is
    much appreciated.
    Thanks,
    Kailash.

  • JDBC Thin Client and Oracle Long Datatype

    I am using Wepshere 4.0.2 , JDBC 2.0 (thin driver) and oracle 9i.
    I have a procedure which takes Oracle Long Datatype as its parameter.
    I use following code to execute procedure.
    String dataforsql="AAA000000003 123123 07/01/200301/01/2003";
    byte[] bytes = dataforsql.getBytes();
    InputStream is = new ByteArrayInputStream(bytes);
    cstmt=conn.prepareCall("call nscw.CPPF_SAVEPDCRAWTABLE2(?,?,?)");
    cstmt.setAsciiStream (1, is,bytes.length);
    The above code works perfectly for data upto 4000 bytes. Once the data crosses the 4000 mark.
    i get a procedure error
    ORA-01460: unimplemented or unreasonable conversion requested

    cstmt.setAsciiStream (1, is,bytes.length);Oracle's support for CLOB (and BLOB) columns using set{Ascii,Binary}Stream() generally s*cks. You'll have to read Oracle's own JDBC manual (you can read it online at http://technet.oracle.com) for whatever sequence they recommend.
    E.g. for insertion and updation of CLOBS, you're supposed to use an oracle-specific function (EMPTY_CLOB()) as the value in the INSERT/UPDATE statement, and then do a SELECT, getClob(), and use Clob APIs to update the actual column value. At least officially. Or you have to use some Oracle-specific APIs in oracle.sql.Connection and oracle.sql.CLOB.

  • Clob DataType, NULL and ADO

    Hello,
    First, I'm french so my english isn't very good
    I have a problem with Oracle Clob DataType. When I try to put NULL value to
    CLOB DataType with ADO, changes aren't not made.
    rs.open "SELECT ....", adocn, adOpenKeyset, adLockOptimistic
    rs.Fields("ClobField") = Null ' In this case, the Update doesn't work
    rs.update
    rs.Close
    This code works if I try to write a value which is different than Null but
    not if is equal to Null. Instead of having Null, I have the old value
    (before changes), the update of the field doesn't work.

    I experience the same, did you find a solution to your problem?
    Kind regards,
    Roel de Bruyn

  • Character sets and ado

    I have a table with a clob field on an Oracle 8.1.7.4 database. When querying the clob field via odbc and ado the value is truncated. The Oracle server and client are using a WE8ISO8859P1 character set. Has anyone come across this before.
    Thanks.

    I believe the data should be able to be represented by IS0-8859. The data is a long random string of characters that represents a fingerprint image.
    We seem to only get 996 characters back from the database. If I do a getchunk on the data then I get 996 characters of data, then 996 NULLS, then 996 characters of data and so on. The 996 NULLS should be data.
    The data is in the database because I can do a dbms_lob.substr and get the correct info back.

  • Exporting a table with Long datatype col. name

    Hello,
    I need help exporting a table, One of the column is long datatype.
    How can I do this without using Export Util?
    Is it possible.
    (If someone has a solution then PLEASE Email
    me)
    URGENT.
    Thanks.
    Pankaj Patel.

    Just wanted to find out, if you already solved this problem. I have a similar issue with long column. I am trying to sql dump a table with long column that will be imported into another database(probably using sql*load), but the spooled file puts the data from the long column in separate lines 80 char long and not on a single line. I have set the long to 64000 and linesize to 32000. Wrap is on too.
    null

  • Long Datatypes in Reports

    I have a field of long datatype in a table. I need to display the first 200 characters of this field in a report.
    How can I do this. If it is thru Placeholder columns can you explkain in detail how I should go about this.
    null

    It was in the 8i migration guide (http://download-uk.oracle.com/docs/cd/A87860_01/doc/server.817/a86632/migaftrm.htm#6573), but we decided to get to 10g first and then take care of it (since we did a 7 to 10 upgrade in two steps, 7->8 and 8->10).
    So basically I should just leave the SYSTEM tablespace objects alone then? I only tried the system objects conversion on a test database, and since the non-system objects were fine, we converted them on production but left the system ones alone.

  • Extracting clob/blob/long datatypes in delimited file

    I have a few tables in database that have clob/blob/long datatypes. I need to unload this data into delimited file and reload the data into another database. I don't want to use export/import.
    Currently the code that i have can handle varchar2, number, date datatypes quite easily using sqlloader.
    The tables are not too big (hundred to 10k rows approximately) and performance is important but not crucial. The script can run for a few minutes unloading data, that is fine. Code maintenance is of higher priority with pl/sql being the preferred scripting language.
    From the sqlloader manual, i glean that use of special delimiter is important, something like <startlob> and <endlob> .
    I need ideas on how to do this.

    Hi Buddy.
    I am having same kind of Problem. I am using very similar procedure Instead of PUT_RAW I am using put line.
    Writing is not a problem after writing the image into a file I cannot open that. That means Image got corrupted. If you find out some solutions for your problem please help me
    My email id is [email protected]
    Thanks
    AJI

  • VERY URGENT: problem in sql query with long datatype in weblogic

    I have a problem while tryind to retrieve a column value with a long datatype using servlet and oci driver and the server is weblogic5.1 .I have used prepared statement the problem comes in the
    preparedStatement.executeQuery().
    The sql Query is simple query and runs well in all cases and fails only when the long datatype column is included in the query.
    The exception that comes on the weblogic server is that :
    AN UNEXPECTED EXCEPTION DETECTED IN THE NATIVE CODE OUTSIDE THE VM.

    Did you try changing the driver then?
    Please use Oracle's thin driver instead of the oci driver.
    There are many advantages of using the type 4 driver. the first and foremost being that it does not require oracle client side software on your machine. Therefore no enteries to be made in tnsnames.ora
    The thin driver is available in a jar called classes112.zip the class which implements the thin driver is oracle.jdbc.driver.OracleDriver
    the connection string is
    jdbc:oracle:thin:@<machine name>:1521:<sid>
    please try out with the thin driver and let me know.
    regards,
    Abhishek.

  • Illegal use of LONG datatype error message when i create materialized view

    Hello to all
    I want create read only materialized view replication environment two of our tables have LONG datatype when i create materialized view against on them
    I recieve this error message
    CREATE MATERIALIZED VIEW MDB.TOAD_PLAN_TABLE TABLESPACE aramis REFRESH FORCE WITH ROWID AS SELECT * FROM MDB.TOAD_PLAN_TABLE@arahisto
    Error report:
    SQL Error: ORA-00997: illegal use of LONG datatype
    00997. 00000 - "illegal use of LONG datatype"
    Do you know any resort solution for it?
    thanks

    You can not use longs in materialized views over a database link, you can however take a part of a long over to a materialized view.
    I have gotten this to work in the past l had to create a PL/SQL function that you can use to extract the character data from the long column and use that to
    as part of the function you will need to pass in the columns of the table that will identify the unique records so you can pick out the long column
    example function
    -- you will need to make sure this funtion is in the remote location as you can not select longs accross a DB LINK.
    CREATE OR REPLACE FUNCTION MDB.TOAD_PLAN_LONG_CONV
    (pass in the primary key columns for the table)
    RETURN VARCHAR2
    IS
    v_long VARCHAR2(32767) ;
    BEGIN
    BEGIN
    -- need to select the long column into the PL/SQL variable
    SELECT long_column
    INTO v_long
    FROM MDB.TOAD_PLAN_TABLE
    WHERE key_columns = passed columns ;
    EXCEPTION
    WHEN OTHERS THEN
    IF SQLCODE = '-01406' THEN
    NULL ;
    ELSE
    RAISE ;
    END IF ;
    END ;
    RETURN SUBSTR(v_long,1,4000) ;
    END ;
    Then when you create the materialized view utilize that function on the long column.
    create or replace materialized view MDB.TOAD_PLAN_TABLE TABLESPACE aramis REFRESH FORCE WITH ROWID
    AS
    SELECT column1, .... columnx,
    MDB.TOAD_PLAN_LONG_CONV@arahisto (primary key column list) as long_column_name
    FROM MDB.TOAD_PLAN_TABLE@arahisto ;
    See if this will work for you? Keep in mind however this solution will not get the entire long column only as much as a PL/SQL variable will hold of it.
    Mike

  • Using Decode with "Long" datatypes

    Hi,
    I want to use a select statement in a view which uses a decode function involving a "long" datatype. But doing some raises an error "Invalid datatypes". Is there a way around?
    Anupam.

    I'm a bit puzzled as to what it is you are trying to achieve (it has been an afternoon for vague requirements). Normally the sort of data that we would want to store in a LONG is ,er, long and therefore not susceptible to use in a DECODE. But it does not matter, because we can only manipulate LONGs in PL/SQL and that does not parse DECODE statements. We will have to use IF...ELSE constructs instead.
    CREATE OR REPLACE FUNCTION l2v (pl in rowid)  RETURN VARCHAR2
    AS
        ll LONG;
        rv VARCHAR2(20);        
    BEGIN
       SELECT col1
       INTO ll
       FROM   T_LONG
       WHERE  rowid = pl;
       IF ll LIKE '%text%'
       THEN
          rv := 'yes!';
       ELSE
          rv :=  'noooo';
       END IF;
       RETURN rv;
    END;
    SQL> select l2v(rowid) from t_long;
    L2V(ROWID)
    yes!
    yes!
    SQL> You can use this function in a query. Note that it is doing a SELECT in its own right so this will not be a very performant solution if you build the view on a big table.
    Cheers, APC

  • Substr with long datatype

    i try to use the substr function with the long datatype but it gave me error ora-00932 inconsistant datatypes...........

    i had saw u r given link and try that example also but it gave me the same ora-06502
    declare
    text_c1 varchar2(32767);
    sql_cur varchar2(2000);
    begin
    sql_cur := 'select '||'text'||' from
    '||'alpine'||'.'||'letters'||' where letter_id =
    '||chr(39)||7||chr(39);
    dbms_output.put_line (sql_cur);
    execute immediate sql_cur into text_c1;
    text_c1 := substr(text_c1, 1, 4000);
    --RETURN ;                                      
    dbms_output.put_line (TEXT_C1);
    END;

  • Copying data contianing long datatype from one schema to another

    I'm using Oracle 8.1.7 and trying to move copy data from one schema to another.
    Usually an easy task. This time the data contains longs so I can't use standard SQL. The data in the long is too long for a PL/SQL long datatype so that's not worked.
    I've tried the COPY FROM command but get the invalid sql command error.
    Can anyone save my hair?

    The COPY command doesn't have to be all on one line. The continuation character for SQL*Plus commands is a hyphen.
    SQL> prompt "Hello"
    "Hello"
    SQL> prompt -
    "Hello""Hello"
    SQL>Metalink is the website for customers that pay for Oracle support. Go to www.oracle.com and click on the metalink button on the top left of the screen. It's called Metalink because Oracle support levels are named after metals: bronze, silver, gold.

Maybe you are looking for