I used DBI style method calls for running the sql, you need to find an equivalent method call for the ODBC module you are using. (Maybe $dbh->Sql ? I don't know, I don't use windows)
| [reply] |
Yes, I tried this;
my $result = $dbh->sql("SELECT * FROM $qry WHERE group_name='Procureme
+nt'");
foreach (@$result)
{
print @$_;
}
and I got this;
Can't use string ("1") as an ARRAY ref while "strict refs" in use at U
+:\scripts\odbc1.pl line 15.
Hmmmm. Holy ones please HELP!
Blackadder
| [reply] [d/l] [select] |
$sql="select * from foo";
if($db->Sql($sql)) {
warn "i failed: " . $db->Error();
}else{
print "read the documentation on FetchRow(), Data() and DataHash()
+\n";
}
HTH - Mark
| [reply] [d/l] [select] |
| [reply] |
Use DBD::ODBC instead of Win32::ODBC. It is much better documented, supported, and widely known.
| [reply] |
| [reply] |