ID: 9696
Updated by: kalowsky
Old-Status: Open
Status: Feedback
Bug Type: ODBC related
PHP Version: 4.0.4pl1
Assigned To: 

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?  

Previous Comments:

[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"


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.


$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


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.




There output HTML Source is following:




But, the same process on Perl is OK.

The Perl Script is following:

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;

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

if ($data->Sql($sql)) {
        print $sql_error;

@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>";
        for ($i=0; $i<$sum; $i++) {
                print "<td>$da[$i]</td>";
        print "</tr>n";

print "</table>nn";



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at

PHP Development Mailing List <>
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