Bug #38894 [Fbk->NoF]: VARBINARY column fails

From: Date: Sun, 03 Jul 2016 04:22:20 +0000
Subject: Bug #38894 [Fbk->NoF]: VARBINARY column fails
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-201998@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=38894&edit=1

 ID:               38894
 Updated by:       php-bugs@lists.php.net
 Reported by:      m dot karoly at martondesign dot com
 Summary:          VARBINARY column fails
-Status:           Feedback
+Status:           No Feedback
 Type:             Bug
 Package:          ODBC related
 Operating System: winxpprof
 PHP Version:      5.2.5
 Assigned To:      cmb
 Private report:   N

 New Comment:

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.


Previous Comments:
------------------------------------------------------------------------
[2016-06-20 16:29:50] cmb@php.net

Is that still an issue with recent PHP versions? There have been
made quite some improvements to ODBC not too long ago.

------------------------------------------------------------------------
[2007-12-11 19:41:35] m dot karoly at martondesign dot com

<?php
$conn = new PDO('odbc:RDS', 'user', 'pass');
$qp = $conn->prepare("select de_noteblob from user where rowid = 8598");
$qp->execute();
$results_array = $qp->fetchAll(PDO::FETCH_ASSOC);
var_dump($results_array);
?>

Expected: Lists an array: de_noteblob is a text
de_noteblob = string(24) "Test string, test string"


Actually results: Memory pieces with the exact length.
de_noteblob = string(24) "????yx>><?php sd|rw4r45"

------------------------------------------------------------------------
[2006-11-08 07:37:56] m dot karoly at martondesign dot com

With PDO extension i can fetch the right data!
odbc functions not working yet.

------------------------------------------------------------------------
[2006-09-20 08:59:53] m dot karoly at martondesign dot com

Description:
------------
The code i commented well, see below.

Short description:
When i try to make a SELECT, and get the rows, the odbc_fetch_rows, odbc_fetch_array,
odbc_result_all returns FALSE.
The connection works, the schema, table, columnnames i can receive in php.

Platforms i tested:
Php 4.4.4 + Velocis (2.1) = Everythings work
Php 5.1.6 + Velocis (2.1) = Not working
Php 4.4.4 + Birdstep (6.0) = Not working
Php 5.1.6 + Birdstep (6.0) = Not working
Php 5.2.x-dev + Birdstep (6.0) = Not working

Reproduce code:
---------------
<?php

$conn = odbc_connect("RDS","username","password", SQL_CUR_USE_ODBC );
// When i connect to the dsn, everything is ok. (returns with a resource id)

$odbc_result = odbc_columns($conn); // When make a query to get the "schema.table name.column
name". (returns with a resource id)
while (odbc_fetch_row($result)){ // in this case the odbc_fetch_row is working, but if i pass a
odbc_exec return value as a parameter, it won't
  
echo"<br>".odbc_result($result,"TABLE_SCHEM").'.'.odbc_result($result,"TABLE_NAME").".".odbc_result($result,"COLUMN_NAME");
}

$odbc_result = odbc_exec($conn, "SELECT * FROM schema.table"); // When i make a query, it
seems to be ok too. (returns with a resource id)

odbc_result_all($odbc_result); // but -as i mentioned above - if i fetch the result of an odbc_exec
(or odbc_do) query, it returns with FALSE
// doesn't matter what fetch function i call, none of them returns data (odbc_fetch_array,
odbc_fetch_row, odbc_result_all...)

?>

Expected result:
----------------
odbc_fetch_array: returns array
odbc_fetch_row: returns string
odbc_result_all: returns html table


Actual result:
--------------
odbc_fetch_array: returns false
odbc_fetch_row: returns false
odbc_result_all: returns false


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



--
Edit this bug report at https://bugs.php.net/bug.php?id=38894&edit=1


Thread (8 messages)

« previous php.bugs (#201998) next »