freebsd php5.3 pdo_odbc 查询 sql server varchar门类 text类型不显示

WBOY
Release: 2016-06-13 12:38:49
Original
1196 people have browsed it

freebsd php5.3 pdo_odbc 查询 sql server varchar类型 text类型不显示

本帖最后由 jingyanlei 于 2013-08-21 14:42:55 编辑 varchar不能大于255 text直接不显示,php换了几个版本都一样,在win环境下查询正常
代码:
$conn = new PDO("odbc:s_test_33", 'sa', 'sa'); 
$conn->setAttribute(PDO::ATTR_CASE, PDO::CASE_UPPER);
$conn->query('SET TEXTSIZE 3145728');
//查询数据
$sql = 'select top 6 * from dbo.b1';
//$stmt = $conn->query($sql);
$stmt = $conn->prepare($sql);
$stmt->execute();
var_dump($stmt);
$result = $stmt->fetchAll(PDO::FETCH_ASSOC);
print_r($result);
错误:
Array
(
    [0] => SL009
    [1] => 0
    [2] => [unixODBC][Driver Manager]No columns were bound prior to calling SQLFetch or SQLFetchScroll (SQLFetchScroll[0] at /usr/ports/databases/php53-pdo_odbc/work/php-5.3.27/ext/pdo_odbc/odbc_stmt.c:537)
    [3] => SL009
)
free FreeBSD PDO SQL?Server odbc
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template