ID:               21042
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Open
+Status:           Bogus
 Bug Type:         ODBC related
 Operating System: Windows NT 4.0
 PHP Version:      4.3.0RC3
 New Comment:

please read the options on using odbc_connect() and setting cursors for
more information on how to work around this.

Technically a MEMO field is not a valid field for ODBC v2, and as such
is not supported by PHP.  The truth is you can hack around it using the
cursor settings in the odbc_connect.  Good luck.

Not a bug.


Previous Comments:
------------------------------------------------------------------------

[2002-12-16 06:10:00] [EMAIL PROTECTED]

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 this bug report at http://bugs.php.net/?id=21042&edit=1

Reply via email to