in reply to Extracting data from an Ms ACCESS query
Now, once you have a successful query, you need to retrieve the results. This is achieved in two steps. Step 1, fetch the row from the ODBC recordset. Step 2, move the contents of the row into a variable. I usually do it this way.if($Hydra_db->Sql("SELECT * FROM $qry")){ print "SQL Error: ".$Hydra_db.Error()."\n"; }
You can also pull the data into a hash. I'm not aware of any pod or other freely available doc that covers Win32 ODBC-maybe another Monk has a suggestion-but Dave Roth's Win32 Perl Programming: The Standard Extentions, 2nd Ed and Martin Brown's Active Perl Developer's Guide are two books that provide a lot of useful information on using Win32ODBC.if($Hydra_db->Sql("SELECT * FROM $qry")){ print "SQL Error: ".$Hydra_db.Error()."\n"; }else{ # keep retrieving rows until nothing is left while($Hydra_db->FetchRow()){ # pull one record into a variable for use @groupapps = $Hydra_db->Data(); print @groupapps,"\n"; } }
|
|---|