bhakti.thakkar 0 Newbie Poster

hi all,
i have a table whose structure is as below:

Name                                      Null?    Type
----------------------------------------- -------- ----------------
NEWSLETTER_ID                             NOT NULL NUMBER
SUBJECT_VC                                         VARCHAR2(255)
MAILTYPE_VC                                        VARCHAR2(50)
CONTENT_TXT                                        CLOB
SCHEDULE_DT                                        VARCHAR2(50)
SYSTEM_HOOK_VC                                     VARCHAR2(50)
NSTATUS_SI                                         NUMBER
TEMPLATE_ID                                        NUMBER

i want to insert data in this table. below is my php script i m using odbc to connect to oracle

php script:

if ($Newsletter_ID=='') {
    $nid = GetMaxID('Newsletter_ID','Newsletter_T');
    $system_hook_VC=uniqid();

    $nStatus_SI=0;

    $sth=$db->prepare("insert into Newsletter_T (Newsletter_ID , Subject_VC , MailType_VC , Content_Txt , Schedule_DT , nStatus_SI , system_hook_VC , Template_ID) values (:var1, :Subject_VC, :MailType_VC, :Schedule_DT , :Content_Txt, :nStatus_SI, :system_hook_VC, :Template_ID)");

    $bindvars=array(
                    "var1" => $nid,
                    "Subject_VC" => $Subject_VC,
                    "MailType_VC" => $MailType_VC,
                    "Content_Txt" => $Content,
                    "Schedule_DT" => $Schedule_DT,
                    "nStatus_SI" => $nStatus_SI,
                    "system_hook_VC" => $system_hook_VC,
                    "Template_ID" => $Template_ID
                    );
    print_r($bindvars);
    $x=$db->execute($sth,$bindvars);
    print_r($x);
}

but its failing. i m getting an error or DB: mismatch

values of bind variables are as follows:

Array ( [var1] => 1 [Subject_VC] => DIVIDEND TEMPLATE [MailType_VC] => html [Content_Txt] => 

Dear Shareholder,

BOARD MEETING NOTICE

We wish to inform you that, the Meeting of the Board of Directors of our Company is scheduled to be held on Monday, January 01, 2007 to take on record, amongst other business, the unaudited financial results and Segment-Wise Financial Report for quarter and half year Monday, January 01, 2007

We also wish to inform you that at the said Meeting, the Board of Directors will consider payment of Interim Dividend for the financial year

The Record for this Interim Dividend is Monday, January 01, 2007 and the date of payment is Monday, January 01, 2007

We request you to provide us with your ECS details before Monday, January 01, 2007 to enable us to remit dividend through ECS.

(please ignore if you have already given this details)

XXXXXXXXXXX

Company Secretary &
Vice President – Human Resources

[Schedule_DT] => 29-Nov-2007 [nStatus_SI] => 0 [system_hook_VC] => 474e5ba0c7520 [Template_ID] => 1 )

i m really going mad on this.

Please help me

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.