Re: Would you please do me a favor?
- From: bin_zhouemail@xxxxxxxxx
- Date: 20 Dec 2006 09:54:26 -0800
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.
.
- References:
- Would you please do me a favor?
- From: Bin Zhou
- Re: Would you please do me a favor?
- From: John Scoles
- Would you please do me a favor?
- Prev by Date: RE: DBD-Oracle and Oracle versions
- Next by Date: Unix: Oracle User Identified Externally
- Previous by thread: Re: Would you please do me a favor?
- Next by thread: DBD-Oracle and Oracle versions
- Index(es):
Relevant Pages
|