I am having difficulty deleting rows in DBD::AnyData.
Below is a sample that does not work for me. The return from the do() says 4 rows, but then the count(*) says there are still 4 rows in the table.
Thanks for any information
installation specs:
Linux myserver 2.6.26-2-686 #1 SMP Wed May 12 21:56:10 UTC 2010 i686 GNU/Linux
This is perl, v5.10.0 built for i486-linux-gnu-thread-multi
Module id = DBD::AnyData
DESCRIPTION DBI access to XML, CSV and other formats
CPAN_USERID JZUCKER (Jeff Zucker <jeff@vpservices.com>)
CPAN_VERSION 0.110
use strict; use DBI; my($sql, $sth); my $dbh = DBI->connect('dbi:AnyData(RaiseError=>1):'); $dbh->{TraceLevel} = 1; $dbh->func( 'obs', 'CSV', [<DATA>], 'ad_import'); $sql = "delete from obs"; my $ret = $dbh->do($sql); print "ret: $ret\n"; $sql = "select count(*) from obs"; $sth = $dbh->prepare($sql); $sth->execute(); my $count = $sth->fetchrow_array(); $sth->finish(); print "$count rows in obs after delete\n"; __DATA__ "obs_id","flow_nm","event_type_nm","event_subtype_nm","event_selected" 1,nw,flow_nw_pyro,pyro_1_less,0 2,nw,flow_nw_pyro,pyro_1_2,0 3,nw,flow_nw_pyro,pyro_2_3,0 4,nw,flow_nw_pyro,pyro_3_more,1
In reply to DBD::AnyData delete rows by Perly Eyed
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |