DBIC 生成“无效精度”主键错误

发布于 2024-09-03 12:33:27 字数 550 浏览 2 评论 0原文

该表存储文件名。主键是一个自动递增的整数。使用结果集的搜索有效。调用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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

韵柒 2024-09-10 12:33:27

来自 DBIx ::类::存储::DBI::ODBC。我不确定这正是问题所在,但它可以作为您的起点。

已知的访问问题^

精度值无效

尝试存储超过 255 个时收到此错误消息
MEMO 字段中的字符。这
问题是(据我所知)一个错误
在 MS Access ODBC 驱动程序中。这
问题通过设置来解决
列的 data_type
add_columns 中的 SQL_LONGVARCHAR。
SQL_LONGVARCHAR 是一个常量
DBI模块

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.

KNOWN ACCESS PROBLEMS ^

Invalid precision value

This error message is received when trying to store more than 255
characters in a MEMO field. The
problem is (to my knowledge) an error
in the MS Access ODBC driver. The
problem is fixed by setting the
data_type of the column to
SQL_LONGVARCHAR in add_columns.
SQL_LONGVARCHAR is a constant in the
DBI module

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文