Re: DBD::Oracle + BLOB

2008-10-31 Thread Tim Bunce
On Thu, Oct 30, 2008 at 09:20:07PM +, Martin J. Evans wrote: Martin Gainty wrote: I do however, think that with DBD::Oracle it is annoying to have to say bind this as a blob and then (when it is a select) to have it automatically subject to LongReadLen and LongTruncOk as these

Re: DBD::Oracle + BLOB

2008-10-31 Thread Martin Evans
Tim Bunce wrote: On Thu, Oct 30, 2008 at 09:20:07PM +, Martin J. Evans wrote: I do however, think that with DBD::Oracle it is annoying to have to say bind this as a blob and then (when it is a select) to have it automatically subject to LongReadLen and LongTruncOk as these introduce

Re: DBD::Oracle + BLOB

2008-10-31 Thread Martin Evans
Tim Bunce wrote: On Thu, Oct 30, 2008 at 10:43:22AM -0400, John Scoles wrote: I will look into it tomorrow Merijn suggested something like dbd_blob or dbd_binay at the dbd level so we could just do this $s-bind_param (:p1,foo\nbar, {TYPE=dbd_blob}); and let the DBD figure out what

Re: DBD::Oracle + BLOB

2008-10-31 Thread scoles
Having a look at the DBD::ORacle code trying to make $sth-bind_param(:p1, foo\nbar, { TYPE= SQL_BLOB }); work so if would be portable across drivers. and the key problem I am running into of course it that the TYPE= SQL_BLOB will send 30 into bind rather that say the key value 'SQL_BLOB' A

Re: DBD::Oracle + BLOB

2008-10-31 Thread scoles
OK anoter look at it how does this grab everyone use DBI; use DBD::Oracle qw(:sql_types); my $dbh = DBI-connect('', '','', {RaiseError = 1, PrintError = 0}); my $stu = $dbh-prepare ('update w_testsetw_test = :p2where c_test =:p1 and v_test = 1'); $stu-bind_param(:p1,1,);

Re: DBD::Oracle + BLOB

2008-10-31 Thread Tim Bunce
On Fri, Oct 31, 2008 at 12:16:25PM -0400, John Scoles wrote: Having a look at the DBD::ORacle code trying to make $sth-bind_param(:p1, foo\nbar, { TYPE= SQL_BLOB }); work so if would be portable across drivers. and the key problem I am running into of course it that the TYPE=

Re: DBD::Oracle + BLOB

2008-10-31 Thread scoles
On Fri, Oct 31, 2008 at 12:16:25PM -0400, John Scoles wrote: Having a look at the DBD::ORacle code trying to make $sth-bind_param(:p1, foo\nbar, { TYPE= SQL_BLOB }); work so if would be portable across drivers. and the key problem I am running into of course it that the TYPE= SQL_BLOB

Re: DBD::Oracle + BLOB

2008-10-31 Thread Rudolf Lippan
[EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] X-Priority: 5 (Lowest) Message-ID: [EMAIL PROTECTED] X-Sender: [EMAIL PROTECTED] Received: from c-98-242-81-82.hsd1.ga.comcast.net

Re: DBD::Oracle + BLOB

2008-10-30 Thread pDale
On Thu, Oct 30, 2008 at 8:35 AM, H.Merijn Brand [EMAIL PROTECTED] wrote: I don't understand what the error I get has to do with the executed code. Can someone enlighten me? [...] $dbh-do (qq; create table w_test ( c_test numeric (9), v_test numeric (4), s_test

Re: DBD::Oracle + BLOB

2008-10-30 Thread John Scoles
Ok looks like you need to use bind_param with a Blob and also tell DBD::Oracle is is a Blob ie $stu-bind_param(:p1,foo\nbar,{ ora_type = ORA_BLOB }); The code below works #!/usr/local/bin/perl use DBI; use DBD::Oracle qw(:ora_types); my $dbname = 'first10g'; my $dbuser = 'tbo'; my $dbpass

Re: DBD::Oracle + BLOB

2008-10-30 Thread H.Merijn Brand
On Thu, 30 Oct 2008 09:06:52 -0400, John Scoles [EMAIL PROTECTED] wrote: Ok looks like you need to use bind_param with a Blob and also tell DBD::Oracle is is a Blob ie $stu-bind_param(:p1,foo\nbar,{ ora_type = ORA_BLOB }); This is a disaster to all portability! My scripts *ALL* are

Re: DBD::Oracle + BLOB

2008-10-30 Thread Mark Lawrence
On Thu Oct 30, 2008 at 02:34:55PM +0100, H.Merijn Brand wrote: On Thu, 30 Oct 2008 09:06:52 -0400, John Scoles [EMAIL PROTECTED] wrote: Ok looks like you need to use bind_param with a Blob and also tell DBD::Oracle is is a Blob ie $stu-bind_param(:p1,foo\nbar,{ ora_type =

Re: DBD::Oracle + BLOB

2008-10-30 Thread H.Merijn Brand
On Thu, 30 Oct 2008 15:25:05 +0100, Mark Lawrence [EMAIL PROTECTED] wrote: On Thu Oct 30, 2008 at 02:34:55PM +0100, H.Merijn Brand wrote: On Thu, 30 Oct 2008 09:06:52 -0400, John Scoles [EMAIL PROTECTED] wrote: Ok looks like you need to use bind_param with a Blob and also tell

Re: DBD::Oracle + BLOB

2008-10-30 Thread John Scoles
I will look into it tomorrow Merijn suggested something like dbd_blob or dbd_binay at the dbd level so we could just do this $s-bind_param (:p1,foo\nbar, {TYPE=dbd_blob}); and let the DBD figure out what dbd_blob is for them The tack I am looking at is some sort of flag where you tell you

Re: DBD::Oracle + BLOB

2008-10-30 Thread Tim Bunce
On Thu, Oct 30, 2008 at 10:43:22AM -0400, John Scoles wrote: I will look into it tomorrow Merijn suggested something like dbd_blob or dbd_binay at the dbd level so we could just do this $s-bind_param (:p1,foo\nbar, {TYPE=dbd_blob}); and let the DBD figure out what dbd_blob is for them

Re: DBD::Oracle + BLOB

2008-10-30 Thread John Scoles
Again Tim and his wisdom of the ages comes to the rescue. A quick look at DBD::ORacle and his suggestion will take only a few seconds to do. Looks like a patch coming up in the AM. cheers John Scoles Tim Bunce wrote: On Thu, Oct 30, 2008 at 10:43:22AM -0400, John Scoles wrote: I will

Re: DBD::Oracle + BLOB

2008-10-30 Thread H.Merijn Brand
On Thu, 30 Oct 2008 15:06:00 -0400, John Scoles [EMAIL PROTECTED] wrote: Again Tim and his wisdom of the ages comes to the rescue. A quick look at DBD::ORacle and his suggestion will take only a few seconds to do. Well, it was like I suggested, but it still does not remove the need for

RE: DBD::Oracle + BLOB

2008-10-30 Thread Martin Gainty
]; [EMAIL PROTECTED]; dbi-users@perl.org Subject: Re: DBD::Oracle + BLOB On Thu, 30 Oct 2008 15:06:00 -0400, John Scoles [EMAIL PROTECTED] wrote: Again Tim and his wisdom of the ages comes to the rescue. A quick look at DBD::ORacle and his suggestion will take only a few seconds to do

Re: DBD::Oracle + BLOB

2008-10-30 Thread Tim Bunce
On Thu, Oct 30, 2008 at 09:00:38PM +0100, H.Merijn Brand wrote: On Thu, 30 Oct 2008 15:06:00 -0400, John Scoles [EMAIL PROTECTED] wrote: Again Tim and his wisdom of the ages comes to the rescue. A quick look at DBD::ORacle and his suggestion will take only a few seconds to do.

Re: DBD::Oracle + BLOB

2008-10-30 Thread H.Merijn Brand
: [EMAIL PROTECTED]; [EMAIL PROTECTED]; dbi-users@perl.org Subject: Re: DBD::Oracle + BLOB On Thu, 30 Oct 2008 15:06:00 -0400, John Scoles [EMAIL PROTECTED] wrote: Again Tim and his wisdom of the ages comes to the rescue. A quick look at DBD::ORacle and his suggestion will take only

Re: DBD::Oracle + BLOB

2008-10-30 Thread Martin J. Evans
to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. Date: Thu, 30 Oct 2008 21:00:38 +0100 From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] CC: [EMAIL PROTECTED]; [EMAIL PROTECTED]; dbi-users@perl.org Subject: Re: DBD::Oracle

RE: DBD::Oracle blob bug

2002-08-21 Thread Stuart Siner
Hi I also get an access violation on NT4sp6, Oracle 9.0.1.1.1, Activestate build 631 (perl 5.6.1), DBI 1.14, DBD::Oracle 1.06. However it works for me if I don't specify the data type: $sth-bind_param(2, undef); rather than $sth-bind_param(2, undef, { ora_type = ORA_BLOB, ora_field = 'T_BLOB'