----- Original Message ----- 
From: "Raghu Karamel" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Sunday, July 14, 2002 2:54 PM
Subject: Re: DBD::AnyData and Windows 2000


> Ok...here it is
> 
> Table Name : RegistryListOutput
> Columns : cris_bu, cris_kb_id, cris_revisions and wf_task_number
#You must donate for me :-)

How about this?

[Code]
use strict;
use DBI;
my $dbh = DBI->connect( 'dbi:AnyData:', undef, undef, 
        {RaiseError=>1, AutoCommit=>1} );
$dbh->func('RegistryList','XML','t1.xml', 
  { col_map => 
      [
        {'/RegistryListOutput/bu/cris_bu'           => 'cris_bu' },
        {'/RegistryListOutput/bu/kb/cris_kb_id'     => 'cris_kb_id' },
        {'/RegistryListOutput/bu/kb/cris_revisions' => 'cris_revisions' },
        {'/RegistryListOutput/bu/kb/wf_task_number' => 'wf_task_number' },
      ],
  }, 'ad_catalog');
my $sth = $dbh->prepare('select * from RegistryList');
$sth->execute();
my $raRes;
while($raRes=$sth->fetchrow_arrayref()) {
    print "ROW:", join("::", @$raRes), "\n";
}
$sth->finish;
$dbh->disconnect;

[Result]
ROW:abc::110::1.10, 1.20, 1.30::12345
ROW:abc::111::1.80, 1.90, 1.95::12350
ROW:abc::112::1.50, 1.51, 1.54::12355
ROW:abc::113::1.69, 1.70, 1.72::12360
ROW:xyz::110::1.10, 1.20, 1.30::12345
ROW:xyz::111::1.80, 1.90, 1.95::12350
ROW:xyz::112::1.50, 1.51, 1.54::12355
ROW:xyz::113::1.69, 1.70, 1.72::12360

==============================================
Kawai, Takanori(Hippo2000)
   Mail: [EMAIL PROTECTED] [EMAIL PROTECTED]
   http://member.nifty.ne.jp/hippo2000/index_e.htm
   http://www.hippo2000.info/cgi-bin/KbWikiE/KbWiki.pl

The Perl Foundation Grants Are Running Out ?
   http://use.perl.org/articles/02/07/03/2241212.shtml
   http://www.perl-foundation.org/index.cgi?page=grants
==============================================

Reply via email to