Re: (Fwd) Problems inserting into a CLOB field type using DBI PERL

[email protected] (John Scoles)
Newsgroups perl.dbi.users
Message-ID <[email protected]>
Nothing to DBI or DBD oracle

Check your SQL statement you have only 52 '?' but you are trying to bind 
field 53

cheers
John Scoles
Tim Bunce wrote:
> ----- Forwarded message from Arshad Mahmood <[email protected]> -----
>
> Date: Mon, 26 Apr 2010 12:52:41 +0100
> From: Arshad Mahmood <[email protected]>
> To: Tim Bunce <[email protected]>
> Subject: Problems inserting into a CLOB field type using DBI PERL
> X-Mailer: Oracle Connector for Outlook 10.1.3.0.10 100801 (11.0.5510)
>
> Hi Tim,
>
> I am doing some programming on a red hat linux env using DBI with perl and trying to insert into an Oracle database and particularly a CLOB field.
>
> The perl version is perl, v5.8.8 built for x86_64-linux-thread-multi
> The dbi version I am using is most likely the latest version of DBI
> The oracle database I am using is 11g
>
> The CLOB field that I am inserting into is called "request_notes"
>
>
> My code is below;
>
>  $Sql3 = "INSERT into bas_aba_immediaterequests (request_id,submitter,create_date,last_modified_by,modified_date,status,short_description,requesters_name,requesters_email_address,managers_name,managers_email_address,roles,software,request_status_,user_id,tasks,ip_address,facultyschool,other,get_details_live_link_only,documents_oracle_financials_on,budgetcode_oracle_financials_o,responsibility_oracle_financia,responsibility_give_details_or,receive_reports_oracle_financi,ctrro_oracle_financials_only,desktop_set_up_complete,atacf,atacs,cc,fctn,ipn,req,sameas,fcas,please_give_details,location,training_complete,fwall_complete,usertel,mgrtel,checkrlhrauth1,checkrlhrauth2,wfifu,csc,empno,purchasingunit,jobtitle,brrother,team,repbusinessarea,request_notes) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
>
> $Statement3 = $Dbh->prepare($Sql3) or die "Can't Prepare:$DBI::errstr\n";
>
> Then I do the bind for each field
>
> The bind code for the CLOB field is: 
> $Statement3->bind_param(53, $Data, {ora_type => ORA_CLOB, ora_field => 'request_notes'})
>
> $Statement3->execute() || "Cannot Execute SQL Statement insert_sql into its_servicedesk correspond: $DBI::errstr\n";
>
>
> I get the following error in the log files
>
> [Mon Apr 26 12:19:04 2010] [error] [client 130.88.157.213] Can't bind unknown placeholder ':p53' (53) 
>
>
> Can you please assist as ive been stuck on this problem for quite a while now..
>
> Many Thanks
> Ash
>
>
> ----- End forwarded message -----
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.