Hi all,
I have one problem that should not be. I use Access97 on NT server with IIS5. I
couldn't use placeholder in SQL statement as below:
use DBI;
$dbh = DBI->connect("dbi:ODBC:myDSN",'','');
$sql = "Select * From myTable Where ID_Code = ?";
$sth = $dbh->prepare($sql);
...
$sth->execute($ID_code); #ID_code contains ID_Code value
$rc = $sth->fetchrow_hashref;
print $rc->{'FIELD_NAME'}; # no result
I have to change $sql to "Select * From myTable Where ID_Code=$ID_code" and call
$sth->execute() instead to fetch the result to $rc. What's wrong with my code?
Any advices would be greatly appreciated.
Krung.