check these values out. Read the doc about them.
Is the column a long varchar?

# 
print "LongReadLen=$dbh->{LongReadLen}\n";
# 
print "LongTruncOk=$dbh->{LongTruncOk}\n";
        $dbh->{LongReadLen}=5000;


HTH
bob


Scott Phelps wrote:

> Here's a snippet of my code:
> 
> my $dbh = DBI->connect('dbi:ODBC:MYDSN', 'user', 'pass',{RaiseError => 1,
> AutoCommit => 1});
> 
> $sth = $dbh->prepare
> ("INSERT INTO ARTICLES (ARTICLE_TYPE, TITLE, SUBJECT, AUTHOR, SOURCE,
> SOURCE_URL, COPY, PULLQUOTE) VALUES (?, ?, ?, ?, ?, ?, ?, ?)");
> $sth->execute
> ($form{'type'}, $form{'title'}, $form{'subject'}, $form{'author'},
> $form{'source'}, $form{'sourceurl'}, $form{'copy'}, $form{'pullquote'});
> $dbh->disconnect();
> 
> And here's the error I'm getting:
> 
> DBD::ODBC::st execute failed: [Microsoft][ODBC SQL Server Driver]String
> data, right truncation (SQL-22001)(DBD: st_execute/SQLExecute err=-1) at
> editarticle.plx line 23.
> 
> (This is MS SQL 7 on Win2K AS)
> 
> I only get this error when $form{'copy'} is a "large" block of text. I've
> tried changing datatypes and lengths to no avail.
> ______________________________________
> splehP ttocS
> rotartsinimdA smetsyS TN
> secivreS tenretnI renroKbeW
> moc.renrokbew@pttocs
> moc.renrokbew.www
> ______________________________________


-- 

Robert Davis

The two most abundant elements in the universe are hydrogen and stupidity
--- Albert Einstein

email: mailto:[EMAIL PROTECTED]
        mailto:[EMAIL PROTECTED]
        mailto:[EMAIL PROTECTED]
web:   http://people.ne.mediaone.net/rsdavis
        http://rsdavis.ne.mediaone.net
n42 58.476 w70 55.454

Reply via email to