What would be the code if i used Win32:ODBC? The result of the
select statement is a single value and not an array. Appreciate your
help, as I am new to using remote connections to a SQL database with
Perl.
I have used
it in a while loop and performed thousands of queries in the same session
and have had no performance problems, although I'd believe the memory leak
problem mentioned before.
A
similar call using Win32::ODBC would be:
my $dsn = "db_name";
$db = new
Win32::ODBC("DSN=$dsn;UID=$user;PWD=$pw") || die "ERROR: Failed to open
database $!\n" if(!$db);
my $sql="select count(*) from tblTicketFileProcessLog";
$db->Sql($sql);
if ($db->FetchRow())
{
my @data =
"">
}
else
{
print "Query returned no
results.\n";
}
_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs