Re: D3/NT ODBC Php PDO



Rick Smereka wrote:
The problem is that only a fraction of the D3 items are processed. In my
current tests 2,288 out of 15,892 items from the TCL 'count' statement.


if ($stmt->execute())
{
while($row = $stmt->fetch(PDO::FETCH_ASSOC))
{
$input_recs++;
}
}


Random ideas...

1) Try eliminating the Fetch_Assoc. What happens if you try this?:
while(!$stmt->EOF)
{
$stmt->MoveNext();
$input_recs++;
}


2) Does this throw an exception? (Not sure of syntax)
for($i=0;$i<5000;$i++) {
$row = $dbh_d3->fetchAssoc($stmt);
}


3) How about this? (Again, not sure of syntax)
$query = 'SELECT COUNT(*) AS count ';
$query .= 'FROM osorderdetails';
....
if ($stmt->execute())
{
while($row = $stmt->fetch(PDO::FETCH_ASSOC))
{
echo $row["count"];
}
}


4) Might there be some multivalued data in the result set that needs
to be treated as hierarchical?
a) I doubt it with a detail record like that.
b) That shouldn't cause the while() to exit normally.


5) What about a null Item ID in D3? This sometimes happens
accidentally for various reasons. Dunno if that would return an
entire NULL array though. Display the value of the last
$row['OrderDetailID'] then do a LIST (not SORT!) in D3 to see what the
next ID is after the last one received. (Easier to do with BASIC than
watching screen for it.)


6) Does it always stop on the same row? What if you group BY to
change the order of the data received? Will it still stop after 2288
records?


HTH
T
.