I have a cgi-callout used in my form which pulls data from the Database and display for selection, I have this weird problem… whenever my Display_name column in my table (Product) has more than 81 characters, it just skips that Row and throws $DBI::err (in log file only) and continues fetching the next rows .
Final Result: Display all rows except the rows which are caught by exception (Character>81 char)…
Our TS Ver--> 7.2.0.0.0,
OS-->win 2003,
MS SQLServer --> Microsoft SQL Server 2008
Product Table DISPLAY_NAME Column ATTRIBUTE: NVARCHAR(MAX)
TestCase: I updated one row in Product Table with Display_Name column Value --> ‘123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 12’ which is 82 characters, Now this does’nt show up in the list and throws $DBI::err in log file
And this is my snippet of Perl code which I used to grab the data
my $strquery="SELECT ID, FILENAME, END_DATE, DISPLAY_NAME FROM Product order by DISPLAY_NAME";
my $st = $dbh->prepare($strquery) or $logger->error("Couldn't prepare statement: ");
$st->execute() or $logger->error("Couldn't execute statement");
while ($results=$st->fetchall_arrayref(undef, 100)){
foreach my $row (
@$results){ my $id = $row->[0];
my $filename = $row->[1];
my $end_date = $row->[2];
my $title = $row->[3];
my $title_enc = encode_entities($title, "<>");
my $complete_row = "" . $title . "";
push (
@fin_res, $complete_row); #-# (
@fin_res has the complete list which we later use to Print it out
}
debug("CHECKING ERROR : " . $DBI::err); #=#
}
Can anyone please help me get a workaround for this????