Re: Where does "MoveNext" belong to?



I do not know anything special about ADO, but try the more usual way to fetch results:

my $tab4l;
while ( ($tab4l) = $rsnya->fetchrow_array) {

print "\$tab4l: $tab4l \n";

}

Does it work this way?

Best regards

Robert



Patrix Diradja schrieb:
Dear my friends....

I am writing a program use activeperl 5.8, MSSQL and
on Win32 Env.

Here is my code:
===
#!/usr/bin/perl
use Tk;
use Cwd;
use DBI::ADO;
use WriteExcel;
use strict;
use Win32::OLE qw( in );

my $dsn="sigma";
my $uname="sa";
my $pword="penguin";
my @bd4l=("AprovaApp1");

my $strsqltab4l="select name from sys.tables";
my $dbh2 = DBI->connect("dbi:ADO:$dsn", $uname,
$pword)
|| die "Could not open SQL connection.";
my $rsnya = $dbh2->prepare($strsqltab4l);
$rsnya->execute();

while(!$rsnya->{EOF}){
my $tab4l = $rsnya->fetchrow_array;
print "\$tab4l: $tab4l \n";
$rsnya->movenext;
}
====
but than comes problem that I can not solve.

The error message is:
"
Can't get DBI::st=HASH(0x1d2d3f4)->{EOF}: unrecognised
attribute name at C:/Perl/site/lib/DBD/ADO.pm line
1277.
Can't locate object method "movenext" via package
"DBI::st" at Untitled1 line 23.
"

Please tell me why.

Thank you very much in advance.




________________________________________________________ Kunjungi halaman depan Yahoo! Indonesia yang baru! http://id.yahoo.com/



.



Relevant Pages

  • ADO Select Problem
    ... I got bit today by a problem either in ADO.pm or ADO itself. ... During testing, if I comment out the first fetch, the second fails ... This is perl, v5.8.7 built for MSWin32-x86-multi-thread ... exec 7861700 ...
    (perl.dbi.users)
  • Re: using SQLserver, ADO, Delphi: performance issue
    ... reconsidering the ADO option altogether. ... >only fetched when you request a fetch operation. ... You may be using a client-side cursor. ...
    (microsoft.public.sqlserver.programming)
  • Re: ColdFusion
    ... adocst.axes.item(it's in ColdFusion syntax). ... > the ADO for Multidimensional Objects driver instead of ADO. ... >> I've tried adding the datasource under SQL Server but am getting the ... >> Regards, ...
    (microsoft.public.sqlserver.olap)
  • Re: Sp_CursorOpen,Fetch,Close
    ... JDBC drivers can and do use the sp_cursor stored procedures just as ADO ... The JDBC equivalent for the ADO CacheSize property is "fetch size". ... the MS JDBC driver choses to ignore it. ...
    (microsoft.public.sqlserver.jdbcdriver)
  • Re: Pb while closing ADO query
    ... version of MDAC (Microsoft Data Access Components) is installed on your ... Regards, ... > Thanks Michael ... > We installed the ADO upgrade for Delphi 5 and the ADO update 2; ...
    (borland.public.delphi.database.ado)