DBIC 生成“无效精度”主键错误
该表存储文件名。主键是一个自动递增的整数。使用结果集的搜索有效。调用delete方法会生成以下错误消息:
DBIx::Class::Relationship::CascadeActions::delete(): DBI Exception:
DBD::ODBC::st execute failed: [Microsoft][ODBC SQL Server Driver]Invalid
precision value (SQL-HY104) [for Statement "DELETE FROM tblComplaintAttachment
WHERE ( ID = ? )" with ParamValues: 1='8.4.9.3.0.'] at Dups.pl line 17
ID 是主键。如果我打印 ID,它会显示 84930 - 没有句点。知道为什么删除会产生错误吗?
数据库是 SQL Server 2000。我在 Windows XP 下使用 DBIx::Class 和 Strawberry Perl。
The table stores file names. The primary key is an auto-incrementing integer. A search using the result set works. And calling the delete method generates the following error message:
DBIx::Class::Relationship::CascadeActions::delete(): DBI Exception:
DBD::ODBC::st execute failed: [Microsoft][ODBC SQL Server Driver]Invalid
precision value (SQL-HY104) [for Statement "DELETE FROM tblComplaintAttachment
WHERE ( ID = ? )" with ParamValues: 1='8.4.9.3.0.'] at Dups.pl line 17
ID is the primary key. If I print ID, it shows 84930 - without the periods. Any ideas why delete generates the error?
The database is SQL Server 2000. I am using DBIx::Class with Strawberry Perl under Windows XP.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
来自 DBIx ::类::存储::DBI::ODBC。我不确定这正是问题所在,但它可以作为您的起点。
From DBIx::Class::Storage::DBI::ODBC. I'm not sure that's exactly the problem, but it may serve as a starting point to you.