[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Where does "MoveNext" belong to?


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.



	

	
		
________________________________________________________ 
Sekarang dengan penyimpanan 1GB 
http://id.mail.yahoo.com/


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.