From:             [EMAIL PROTECTED]
Operating system: Windows NT 4.0
PHP version:      4.3.0RC3
PHP Bug Type:     ODBC related
Bug description:  Fails to return MS Access MEMO fields

Trying to read MS Access MEMO fields (these are large (>255 chrs) text
fields) fails under 4.3.0RC3 in an Eval'd string whereas they work fine
under 4.2.3.

The error message returned is:

Warning: SQL error: [Microsoft][ODBC Microsoft Access 97 Driver]Invalid
cursor position; no keyset defined , SQL state S1109 in SQLGetData in
c:\InetPub\php\classes\member.php(91) : eval()'d code on line 1

Below is an example of code that causes the problem. The $xFields var is a
CSV list of fields in a table. If only the details field is a MEMO type
then only this will fail. All other types of field (string or numeric) do
not appear to have a problem. The error line will point to the line
containing the 'eval' function call.

################CODE##################

$xFields = "ref,name,details";

function coreLoad ($cur)
{
  global $xFields;

  $flds = explode (",", $xFields);

  for ($i = 0; $i < sizeof ($flds); $i++)
  {
    $str = '$this->' . $flds [$i] . ' = odbc_result ($cur, ' . ($i + 1) .
');';

    eval ($str);
  }
}

################END OF CODE##############

The connection to the MS Access database is through a standard ODBC
connection via the Windows Control Panel. No other modules have been
compiled into PHP either in 4.2.3 or 4.3.0RC3.


-- 
Edit bug report at http://bugs.php.net/?id=21042&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=21042&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=21042&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=21042&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=21042&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=21042&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=21042&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=21042&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=21042&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=21042&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=21042&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=21042&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=21042&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=21042&r=isapi

Reply via email to