CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner: Re: [terrykhatri531] Need help with perl script using DBI: Edit Log



Zhris
Enthusiast

Aug 14, 2014, 1:10 PM


Views: 9049
Re: [terrykhatri531] Need help with perl script using DBI

In the DBD::Oracle documentation, there is information with regards to issues when inserting *LOBS via placeholders:

http://search.cpan.org/~pythian/DBD-Oracle-1.17/Oracle.pm#Handling_LOBs

Code
use DBD::Oracle qw(:ora_types); 
$sth->bind_param($idx, $value, { ora_type=>ORA_BLOB, ora_field=>'PHOTO' });


Also, the following information is in the DBI documentation:

http://search.cpan.org/~timb/DBI-1.631/DBI.pm#execute

Quote
If any arguments are given, then execute will effectively call "bind_param" for each value before executing the statement. Values bound in this way are usually treated as SQL_VARCHAR types unless the driver can determine the correct type (which is rare), or unless bind_param (or bind_param_inout) has already been used to specify the type.


This might be the solution. Note if you do need to explicitly define the data type then you will have to bind the params via bind_param* as it won't be possible via execute.

Chris


(This post was edited by Zhris on Aug 14, 2014, 1:32 PM)


Edit Log:
Post edited by Zhris (Enthusiast) on Aug 14, 2014, 1:10 PM
Post edited by Zhris (Enthusiast) on Aug 14, 2014, 1:12 PM
Post edited by Zhris (Enthusiast) on Aug 14, 2014, 1:13 PM
Post edited by Zhris (Enthusiast) on Aug 14, 2014, 1:14 PM
Post edited by Zhris (Enthusiast) on Aug 14, 2014, 1:32 PM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives