ID: 9696
Updated by: kalowsky
Reported By: [EMAIL PROTECTED]
Old-Status: Feedback
Status: Closed
Bug Type: ODBC related
Operating system: 
PHP Version: 4.0.4pl1
Assigned To: 
Comments:

no user feedback.  considered fixed.  if untrue, please
reopen the bug.

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

[2001-04-22 23:14:02] [EMAIL PROTECTED]
multiple parts.

1) have you tried this with any of the 4.0.5RCs?

2) have you tried using odbc_num_rows to identify how many 
rows you have returned?  and with that looping through your 
odbc_fetch_row using an row specifier?  

---------------------------------------------------------------------------

[2001-03-12 03:43:38] [EMAIL PROTECTED]
There is an error to via an ODBC driver, "INTERSOLV DataDirect
Connect ODBC PROGRESS Driver for Microsoft Windows 95 and 
Microsoft Windows NT, Version 3.11", to use Progress Database.

PHP Version:              4.0.4pl1
OS:                       Windows 2000 5.00.2195
ODBC Version:             3.520.4403.2
ODBC Progress Driver:     INTERSOLV DataDirect Connect ODBC 
                          PROGRESS Driver for Microsoft Win
                          dows 95 and Microsoft Windows NT,
                          Version 3.11"


PHP.INI
_____________
......

odbc.allow_persistent   =       ON
odbc.check_persistent   =       ON
odbc.max_persistent             =       -1      
odbc.max_links                  =       -1
odbc.defaultlrl                 =       4096    
odbc.defaultbinmode             =       1       

......
_____________



The script are following, and mark the state in some step.
_____________________

<?php

$dsn = "TEST";
$uid = "test";
$pwd = "test";

# ODBC DSN Config


$lid = odbc_connect($dsn,$uid,$pwd);

# Connect to DSN. OK.


$sql = "select part from mstr where part like 'VB%'";

$rid = odbc_do($lid,$sql);

# Do the query. OK


header("content-type:text/html;charset=iso8859-1");

echo "<table border=1>n";
while (odbc_fetch_row($rid)){
        $pt = odbc_result($rid,1);
        echo "<tr><td>$pt</td></tr>n";
}
echo "</table>";

# Here, odbc_fetch_row() always is TRUE. I must use the STOP of
# the browser to stop. And the Value of $pt is or NULL.

odbc_close($lid);

?>

______________________


There output HTML Source is following:

______________________


<table><tr><th>pt_part</th></tr>
<tr><td></td></tr>
<tr><td></td></tr>
<tr><td></td></tr>
<tr><td></td></tr>
<tr><td></td></tr>
<tr><td></td></tr>
<tr><td></td></tr>

_______________________


But, the same process on Perl is OK.

The Perl Script is following:

________________________
#!perl
print ("Content-type: text/htmlnn");

use Win32::ODBC;

$DSN = "DSN=test;UID=test;PWD=test";

$data = new Win32::ODBC($DSN);
if (!$data->Connection) {
        print $db_connect_error;
        Win32::ODBC::DumpError;
        die;
}

$sql = "select part from mstr where part like 'VB%'";

if ($data->Sql($sql)) {
        print $sql_error;
        Win32::ODBC::DumpError;
}

@field = $data->FieldNames;
$sum = @field;

print "<table border=1>n<tr>";
for ($i=0; $i<$sum; $i++) {
        print "<td>$field[$i]</td>";    
}
print "</tr>n";

while ($data -> FetchRow) {
        print "<tr>";
        @da=$data->Data;
        for ($i=0; $i<$sum; $i++) {
                print "<td>$da[$i]</td>";
        }
        print "</tr>n";
}

print "</table>nn";

$data->Close;
____________________

---------------------------------------------------------------------------



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=9696&edit=2


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to