I am using ODBC socket server to connect to a remote MS Access database. It does have table employee and timecard. When i send a query to employee table it successfully returned values by when I tried it to timecard table it will not respond.
Here is a chunk of my code:
$result = $db->execute("SELECT employeeid, lname, fname, mname from employee","employee");
$result = $db->execute("SELECT * FROM timecard","timecard");
//this two queries are not send the same time, i just alternately used them.
.
.
.
.
class ODBCSocketServer{
function execute($SQL, $table1) {
$this->table = $table1;
if (!$this->_sendSQL($SQL)) return false;
}
function _sendSQL($sSQL){
$socket = fsockopen($this->HostName, $this->Port, $errno, $errstr, 30);
$sSQL = HTMLSpecialChars($sSQL);
$sSend = "<?xml version=\"1.0\"?>\r\n<request>\r\n<connectionstrin g>$this->ConnectionString</connectionstring>\r\n<sql>$sSQL</sql>\r\n</request>\r\n";
//write request
fputs($socket, $sSend);
$result = "";
//now read response
while (!feof($socket)) {
$result = $result . fgets($socket);
} // while ->> the processing hang-up in this while loop if i send query to timecard table
}//function
}//class