Primary Keys
I was reading along and it struck me that you were using two primaray keys. That's a no no ;) I would recomend examining your data structure, and optimizing it a tad bit more. If you liked, you could even get rid of the news_id field, and us an autoincremental field. I would advise reading this for information on how to setup your database.

String data, right truncation
Now onto your real problem, the string error, I quickly googled and found this on a website. Some other monk will be able to varify if this is true:

What does a Link ODBC Gateway error of "String data, right truncation" mean?

This error is generated by the ODBC driver and suggests that you are trying to populate a table column which has a set maximum character limit with data that exceeds this limit. To avoid this problem, we suggest setting up your table's columns so that they have exactly the same data types as the formats of your form's fields (including size limitations).

Helpful? But wait, there's more! I did a tad bit more research on ODBC with some code I had from a while back, and found this: $st->bind_param($i, $sql, DBI::SQL_LONGVARCHAR);

I noticed that your code was missing a DBI::SQL_LONGVARCHAR, and wanted to see what the heck in meant. So I went onto cpan, and found the pertinant information for DBD::ODBC. Here's what it says:

Note: those trying to bind variables need to remember that you should use the following syntax:
use DBI; ... $sth->bind_param(1, $str, DBI::SQL_LONGVARCHAR);
It's possible that there are more problems, or that these aren't the only problems, but I hope this helps you in your debugging process.
Gyan Kapur
gyan.kapur@rhhllp.com

In reply to One Thing Of Litte To No Consequence, And What Hopefully Is An Answer by Revelation
in thread String data, right truncation error with DBD::ODBC and MS SQL Server 2000 by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.