> >
>
> The strange thing is that the bug seems to depend on the number and
> ordering of the rows. It also depends on what data is in the
> records.
> Reordering will sometimes (not always) change which rows have
> a column
> truncated. Reducing the rows to just the problem ones causes them to
> not be truncated. I tried adding data to all the columns to get a
> better idea of what was being truncated, and that caused
> nothing to be
> truncated.
>
> The code looks like this:
>
> my $sql = <<'END_HERE';
> INSERT INTO excelDroppings (
> uploadID, ownerID, category, color, dealer_cost, description,
> manuf_model, image_name_sm, image_name_lg, manufacturer,
> model, product_id, retail_price, size, status, saleprice,
> [delete] ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
> ?, ?, ?) END_HERE
>
> my $sth = $dbh->prepare($sql);
> foreach my $product (@_)
> {
> my @args = @$product{qw(
> category color dealer_cost description manuf_model
> image_name_sm image_name_lg manufacturer model product_id
> retail_price size status saleprice delete)};
> $sth->execute($uploadID, $ownerID, @args);
> }
>
> The problem records are:
>
> {
> 'saleprice' => '0.00',
> 'category' => 'Fly Tying Tools',
> 'description' => '',
> 'manuf_model' => 'Wasatch Custom Tools',
> 'product_id' => '1100-6834',
> 'status' => 1,
> 'dealer_cost' => 0,
> 'image_name_lg' => '',
> 'retail_price' => '11.95',
> 'manufacturer' => 'Fly Tying Tools',
> 'size' => '',
> 'image_name_sm' => 'W3009.jpg',
> 'model' => 'Hair Stacker Micro',
> 'color' => 'Cocobolo'
> },
> {
> 'saleprice' => '0.00',
> 'category' => 'Fly Tying Tools',
> 'description' => '',
> 'manuf_model' => 'Wasatch Custom Tools',
> 'product_id' => '1100-6839',
> 'status' => 1,
> 'dealer_cost' => 0,
> 'image_name_lg' => '',
> 'retail_price' => '11.95',
> 'manufacturer' => 'Fly Tying Tools',
> 'size' => '',
> 'image_name_sm' => 'W3009.jpg',
> 'model' => 'Hair Stacker X-Large',
> 'color' => 'Cocoboblo'
> },
>
> The sympton is that the "color" column is truncated from
> "Cocobolo" to "C".
>
> - Ian
>
Try sending a trace file (level 9) and I'll take a look. Chances are,
though, if you are not running the latest ODBC driver on the client machine,
that will be a source of the problem. MDAC 2.7 is what I run in tests.
Regards,
Jeff
>