Re: Would you please do me a favor?



Hi, John,

Thank you very much for your reply. There is no table involved, I am
using DBD::Oracle 1.19 under linux. Finally, I can pass blob to
jcf_molconvertbb by the following way. But I still need your help.

my $dbh = DBI->connect("..........");
$dbh->{LongReadLen} = 10000;
my $stmt = "
BEGIN
select jcf_molconvertbb(:in,'smiles:ua_day') into :out from dual;
END;";
open (INFO, "test22.sdf");
my @sd=<INFO>;
close(INFO);
my $sd = join("", @sd);

my $sth = $dbh->prepare( $stmt );
$sth->bind_param( ':in', $sd, { ora_type => ORA_BLOB });
my $out;
$sth->bind_param_inout( ':out', \$out, 1000, { ora_type => ORA_BLOB }
);
$sth->execute;
print $out,"\n";

CREATE OR REPLACE FUNCTION "JCHEM_CARTRIDGE"."JCF_MOLCONVERTBB"
(query BLOB, type VARCHAR2, tmpBlob BLOB:=null)
RETURN BLOB AUTHID CURRENT_USER PARALLEL_ENABLE AS
BEGIN
IF query is null THEN
return NULL;
END IF;
return jchem_blob_pkg.molconvertb(
query, type, null, null, null, null, null, null, tmpBlob);

END;

My questions are the following,

1. I don't know why I failed when I tried the following statement.

My $stmt = "select jcf_molconvertbb(:in,'smiles:ua_day') from
dual;"
Or
my $stmt = "
BEGIN
:out := jcf_molconvertbb(:in,'smiles:ua_day');
END;";
Even tried {ora_check_sql=>0, ora_auto_lob=>0},

Would you please check them and provide a sample based on
jcf_molconvertbb?

2. Do I need free memory for temporary blob? If so, could you tell me
how ?

Thank you very much.

Bin

John Scoles wrote:
If you can give me example table,the function and the SQL you are trying in
JDBC I will have a look at it.
Can you also tell me what OS, and what version of DBD::Oracle and Oracle you
are using.

Seems to me that the latest version of DBD::Oracle should be able to do
this.


.



Relevant Pages

  • Re: Column Order Problem
    ... I understand the reasons for not using the BLOB data types but as I ... >> I'm working on required extending an existing query to retrieve some ... The query is written correctly and returns the ...
    (microsoft.public.data.ado)
  • Re: cx_Oracle issues
    ... the value being returned is too big for the buffer size set for the ... the procedure fetches data from a LOB. ... However I can confirm that running the select query from a client does ... In the first retrieve the BLOB and store ...
    (comp.lang.python)
  • Re: cx_Oracle issues
    ... the value being returned is too big for the buffer size set for the ... the procedure fetches data from a LOB. ... So I tried Rons query but unfortunately I got 0 records returned. ... In the first retrieve the BLOB and store ...
    (comp.lang.python)
  • Re: [Info-ingres] security_auditing query_text interpretation.
    ... and trid=? ... Now that line is reasonably cool, don't worry about the 'blob' stuff, someone just named the tables very poorly. ... Its preparing a dynamic query with two - ... Cursor fetches are a different ...
    (comp.databases.ingres)
  • Re: Column Order Problem
    ... For reasons that I discuss in my books, BLOB columns generally ... > I'm working on required extending an existing query to retrieve some rows ... The query is written correctly and returns the correct ... Where I was encountering the problem was when ...
    (microsoft.public.data.ado)