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

[email protected] ("Arshad Mahmood")
Newsgroups perl.dbi.users
Organization University of Manchester
Message-ID <20100428150829218.00000002820@the-9bc9b23281f>
Hi,

Many thanks for your assistance. Thank you for highlighting that John.

I have managed to fix the problem, I also needed to set the LongReadLen and LongTruncOk attributes which control how long columns are retrieved.

I appreciate your support

Wishing you all the best

Ash
 

-----Original Message-----
From: John Scoles [mailto:[email protected]] 
Sent: 28 April 2010 13:36
To: [email protected]; [email protected]
Subject: Re: (Fwd) Problems inserting into a CLOB field type using DBI PERL

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,statu
> s,short_description,requesters_name,requesters_email_address,managers_
> name,managers_email_address,roles,software,request_status_,user_id,tas
> ks,ip_address,facultyschool,other,get_details_live_link_only,documents
> _oracle_financials_on,budgetcode_oracle_financials_o,responsibility_or
> acle_financia,responsibility_give_details_or,receive_reports_oracle_fi
> nanci,ctrro_oracle_financials_only,desktop_set_up_complete,atacf,atacs
> ,cc,fctn,ipn,req,sameas,fcas,please_give_details,location,training_com
> plete,fwall_complete,usertel,mgrtel,checkrlhrauth1,checkrlhrauth2,wfif
> u,csc,empno,purchasingunit,jobtitle,brrother,team,repbusinessarea,requ
> est_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.