Hi all
How to get the recordset from list page. I followed from
Connecting to MS ACCESS? http://www.hkvforums.com/viewtopic.php? ... ord#p77489
Access the Export-Recordset http://www.hkvforums.com/viewtopic.php? ... ted#p79138
add action button near export, print, ecc http://www.hkvforums.com/viewtopic.php?f=4&t=27074
by using code as below for function LoadRecordSet in Tablelist.php and function Recordset_Selected in Tableinfo.php After that can not get records and data shown in list page disappear.
function LoadRecordset($offset = -1, $rowcnt = -1) {
global $conn;
// Call Recordset Selecting event
$this->Recordset_Selecting($this->CurrentFilter);
// Load List page SQL
$sSql = $this->SelectSQL();
// Load recordset
$rs = ew_LoadRecordset($sSql);
if ($rs->RecordCount() > 0) { // If data found
$rs->MoveFirst(); // move to first record
while ($rs && !$rs->EOF) { // loop through the recordset
// Displaying the data
echo $rs->fields("WorkDate") . " ";
echo $rs->fields("Name") . " ";
echo $rs->fields("TimeIn") . " ";
echo $rs->fields("TimeOut") . " ";
echo $rs->fields("ABSENCE_NO") . " ";
echo $rs->fields("DOCUMENT_NO") . " ";
echo $rs->fields("Remark") . "<br>";
$rs->MoveNext(); // move to next record until EOF
}
$rs->Close(); // close the recordset after finished
} else { // if no data found
echo "No data found.";
}
}
function Recordset_Selected(&$rs) {
global $conn;
if ($rs->RecordCount() > 0) { // If data found
$rs->MoveFirst(); // move to first record
while ($rs && !$rs->EOF) { // loop through the recordset
// Displaying the data
echo $rs->WorkDate . " ";
echo $rs->Name . " ";
echo $rs->TimeIn . " ";
echo $rs->TimeOut . " ";
echo $rs->ABSENCE_NO . " ";
echo $rs->DOCUMENT_NO . " ";
echo $rs->Remark . "<br>";
$rs->MoveNext(); // move to next record until EOF
}
$rs->Close(); // close the recordset after finished
}
}
Thank you very much for the advice.