in reply to Re: DBI and Win32::OLE Conflict?
in thread DBI and Win32::OLE Conflict?

I need to keep that ampersand in there. If I change it to 'and' the item will not go into QuickBooks because the customer name I would be supplying is different from the one in QuickBooks.

Besides, this isn't the case, because the ampersand comes out as & in the XML and QB slurps that up (as it always has) just fine.

I really do appreciate your effort, though

Replies are listed 'Best First'.
Re: Re: Re: DBI and Win32::OLE Conflict?
by poj (Abbot) on Jan 02, 2003 at 21:13 UTC
    Ok sorry, I saw the previous reply too late
    I'm looking at the difference between the first and second cases. In the first case this code
    my @data = <DATA>; foreach my $line (@data) { my ($customer, $service, $duration, $date) = split(/,/, $line); print "$customer:$service:$duration:$date:\n"; } __DATA__ Cahoots Sports Bar & Grill,AP,PT00H01M,2003-01-01 Cahoots Sports Bar & Grill,AP,PT00H01M,2003-01-01 Cahoots Sports Bar & Grill,AR,PT00H01M,2003-01-01

    shows the $date field has a \n on it.
    Not sure if this is significant but worth a look
    poj

      /me smacks herself in the head

      And this is why we shouldn't re-invent the wheel :)

      That doesn't seem to be the problem, because the first program is the one that's working (despite the \n). Interesting though that the \n gets lost when the XML is generated.

      Good catch!

        Just another wild guess really, are you sure this is correct and the same in both cases ?
        <!DOCTYPE QBXML PUBLIC '-//INTUIT//DTD QBXML QBD 1.1//EN'>
        poj
        Let's assume there is some conflict caused by having the DBI connection open. Try reading the data from the CSV into a hash, close the connection and then feed it into Qb
        poj