请教 php+sql2005游标问题

红衣老大 2008-03-27 09:41:01
一个php+sql2000的站点
在更换服务器后 使用的sql2005
基本正常,但是在其中一个页面出现下边错误
Warning: odbc_fetch_into(): SQL error: [Microsoft][ODBC SQL Server Driver]无效的游标位置, SQL state S1109 in SQLGetData in

D:\www\include\odbc.inc on line 77

line 77内容 $this->$stat = odbc_fetch_into($this->Query_ID, &$this->Record, ++$this->Row);
line 77所在的整个函数
function NextRecord() {
$this->Record = array();
$this->$stat = odbc_fetch_into($this->Query_ID, &$this->Record, ++$this->Row); '''''77
if (!$this->$stat) {
if ($this->Auto_Free) {
odbc_free_result($this->Query_ID);
$this->Query_ID = 0;
};
} else {
// add to Record[<key>]
$count = odbc_num_fields($this->Query_ID);
for ($i=1; $i<=$count; $i++)
$this->Record[strtolower(odbc_field_name ($this->Query_ID, $i)) ] = $this->Record[ $i - 1 ];
}
return $this->Record;
}

google一下 大概是 sql2000的游标可以隐式转换,sql2005需要显示转换。
我不会php的语法,请问该怎么写啊
...全文
84 1 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
红衣老大 2008-03-27
  • 打赏
  • 举报
回复
没人? 还是分低?

21,893

社区成员

发帖
与我相关
我的任务
社区描述
从PHP安装配置,PHP入门,PHP基础到PHP应用
社区管理员
  • 基础编程社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧