15 Jun 2005 02:15
Possible bug in FetchField for MSSQL driver?
Chris Wiegand <cwiegand <at> signalbhn.org>
2005-06-15 00:15:24 GMT
2005-06-15 00:15:24 GMT
I think I've found a bug related to function _adodb_getupdatesql, file
adodb-lib.inc.php, version 465, around line 492. I've added some echo
statements to the code below to help me figure this out:
echo print_r($rs,true);
// Loop through all of the fields in the recordset
for ($i=0, $max=$rs->FieldCount(); $i < $max; $i++) {
// Get the field from the recordset
$field = $rs->FetchField($i);
// If the recordset field is one
// of the fields passed in then process.
$upperfname = strtoupper($field->name);
echo "<BR>upperfname = $upperfname";
if (adodb_key_exists($upperfname,$arrFields,$force))
{
I consistently am getting false/blank for $upperfname, and it's therefore the
function's not working. But a print_r($rs) gives plenty of fields, as shown
below. Actually, I'm starting to think the error is in the FetchField()
function for mssql, since it's what appears to be returning false/blank, but
I can't seem to find mssql_fetch_field in any of the files.
adorecordset_mssql Object ( [dataProvider] => native [fields] => Array (
[Payer] => 116 [PayerType] => 1 [RequiresValidReferral] => 1 [PayerAccountID]
=> 1161 [InitReferralsAutoApproved] => 1 [NOCReferralsAutoApproved] => 1
[Switch2AFSMonth] => 4 [Switch2PayerAccountID] => 0
[RequireReportsBeforeServices] => 1 [ReferralsEnabled] => 1
[CWRequireTrailsCaseID] => 0 [PayerAccountName] => Denver County
(Continue reading)
RSS Feed