PDOException:SQLSTATE [HY000]:常规错误:-804动态SQL错误SQL错误代码= -804 SQLDA结构中的值不正确

时间:2013-11-23 18:47:26

标签: php sql pdo firebird

我从php pdo连接到firebird db:

<?php
const _QUERY = 'SELECT * FROM R_GETTABLEPROPS(:ATABLEID,:ATABLENAME,:AMASTERTABLEID,:AMASTERTABLENAME,:FLAGS)';
$dbh = new PDO($dsn, $dbconf['user'], $dbconf['pass']);
$s = $dbh->prepare(_QUERY);
$s->bindValue(':ATABLENAME', 'LISTW');
$s->execute(); // error here
$s->bindColumn('SQLCOMMAND', $data, PDO::PARAM_LOB);
$query = $s->fetchAll(PDO::FETCH_BOUND);

R_GETTABLEPROPS是:

create or alter procedure R_GETTABLEPROPS (
ATABLEID integer,
ATABLENAME varchar(31),
AMASTERTABLEID integer,
AMASTERTABLENAME varchar(31),
FLAGS varchar(10))
returns (
TABLEID integer,
SQLCOMMAND blob sub_type 1 segment size 80
as …

错误:

  

PDOException:SQLSTATE [HY000]:常规错误:-804动态SQL错误SQL错误代码= -804 SQLDA结构中的值不正确

如何在PDO中使用FB blob?没有blob的查询正在运行!

FB客户端和服务器是版本2.1.2。

0 个答案:

没有答案