Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: LONG RAW Problem

Re: LONG RAW Problem

From: Martin Haltmayer <Martin.Haltmayer_at_0800-einwahl.de>
Date: Tue, 22 Feb 2000 14:21:53 +0200
Message-ID: <38B27F61.42F8FF3B@0800-einwahl.de>


I found a way around it. It is working fine with native dynamic SQL:

begin

   execute immediate 'insert into testlong (id, lng) select id, pict from testblob';
end;
/

Crazy, huh?

Martin

Martin Haltmayer wrote:
>
> We use Oracle 8.1.5 EE and want to pass pictures to and from ADO 2.1 in
> an ASP.
>
> To retrieve pictures from the db we have to use LONG RAW because BLOBs
> are not supported in ADO 2.1 (we found this info at www.microsoft.com)
> and the Oracle OLEDB is yet beta.
>
> So I tried:
>
> SQL>
> SQL> drop table testlong;
>
> Table dropped.
>
> real: 1252
> SQL>
> SQL> create table testlong (id number primary key, lng long raw);
>
> Table created.
>
> real: 1402
> SQL>
> SQL> describe testblob
> Name Null? Type
> ----------------------------------------- --------
> ----------------------------
> ID NOT NULL NUMBER
> PICT BLOB
>
> SQL>
> SQL> select count (*) from testblob;
> 1
>
> 1 row selected.
>
> real: 240
> SQL>
> SQL> insert into testlong (id, lng)
> 2 select id, pict from testblob;
>
> 1 row created.
>
> real: 171
> SQL>
> SQL> commit;
>
> Commit complete.
>
> real: 20
> SQL>
> SQL> select count (*) from testblob;
> 1
>
> 1 row selected.
>
> real: 0
> SQL>
> SQL> truncate table testlong;
>
> Table truncated.
>
> real: 550
> SQL>
> SQL> select count (*) from testblob;
> 1
>
> 1 row selected.
>
> real: 11
> SQL>
> SQL> begin
> 2 insert into testlong (id, lng)
> 3 select id, pict from testblob;
> 4 end;
> 5 /
> begin
> *
> ERROR at line 1:
> ORA-06550: line 3, column 13:
> PLS-00381: type mismatch found at 'PICT' between column and variable in
> subquery or INSERT
> ORA-06550: line 2, column 2:
> PL/SQL: SQL Statement ignored
>
> This error message I do not understand. Why does it work in sqlplus but
> not in PL/SQL?
>
> Martin
Received on Tue Feb 22 2000 - 06:21:53 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US