Interbase 错误:SQLDA 缺失或版本不正确,或者变量数量/类型不正确

发布于 2024-08-12 06:28:34 字数 1508 浏览 3 评论 0原文

我在许多通过 BDE 连接到 Interbase 的 TQuery 上遇到此错误。确切的消息是:

一般 SQL 错误。动态 SQL 错误,SQL 错误代码 = -804,SQLDA 缺失或版本不正确,或者变量数量/类型不正确。

当我尝试在设计时打开/编辑 TQuery 或在运行时完成发布时,该消息就会出现。对于运行时的 Post 操作,我发现如果我在 Post 之前准备表格,Post 就会很好地完成。

我已阅读 Craig Stunz 关于相同错误的博客。我的参数都是整数。数据库很小,Interbase 2009,我没有看到显示错误消息的查询的特定模式(可以选择、删除、更新等)。从 Delphi 中运行查询就可以了。

这些表具有数字数据类型 (15,2)。

这些表已从 Interbase 版本 5 - 方言 1 备份/恢复到 Interbase 2009。

实际 ODS 为 13.1 (Interbase 9)。

没有 UDF。

知道出了什么问题吗?

[更新]

未显示错误/显示错误的查询示例:

无错误:

select MASTER_ID, GL_ACCT_DR, GL_ACCT_CR,
VENDOR_ID, VENDOR_CODE,
ORDER_NO, ORDER_DATE, INVOICE_NO, INVOICE_DATE,
DESCRIP, BUYER, SHIP_VIA, FOB, IS_FREIGHT_PREPAID,
IS_TAXABLE, TERMS_ID, TERMS_CODE,
DISC_DAYS_OR_DATE, DISCOUNT_PCT, NET_DAYS_OR_DATE,
BILL_TO_LOC_ID, SHIP_TO_LOC_ID,
BILL_TO_LOC_CODE, SHIP_TO_LOC_CODE,
DISCOUNT_DATE, DUE_DATE
from P_JRNTRN where
ENTITY_DB_ID = :PRIMARY_DB_ID and
SRC_MODULE = 'PJ'
order by INVOICE_NO

参数为整数。

错误:

select * from P_JRNTRN where
BATCH_ID = :BATCH_ID
order by MASTER_ID

参数为整数。

[更新] ... 我无法解决这个问题,所以我转向 IBDAC 来替代 BDE。我没有再收到错误。 感谢大家。

I get this error on many of the TQuery connected to Interbase via BDE. Exact message is:

General SQL Error. Dynamic SQL Error, SQL error code = -804, SQLDA missing or incorrect version, or incorrect number/type of variables.

The message appears as soon as I try to open/edit the TQuery at design time, or when a Post is done at run time. For the Post action at run time, I have found that if I Prepare the table before the Post, the Post is done nicely.

I have read Craig Stunz's Weblog about same error. The parameters I have are all integers. Database is small, Interbase 2009, and I see no particular patterns with the queries that show the error message (it can be selected, deleted, updated etc.). Running the query out of Delphi is just fine.

The tables have numeric data type (15,2).

The tables have been backup/restored from Interbase version 5 - dialect 1 to Interbase 2009.

Actual ODS is 13.1 (Interbase 9).

No UDFs.

Any idea what is wrong?

[UPDATE]

Samples of query not showing the error / showing the error:

No Error:

select MASTER_ID, GL_ACCT_DR, GL_ACCT_CR,
VENDOR_ID, VENDOR_CODE,
ORDER_NO, ORDER_DATE, INVOICE_NO, INVOICE_DATE,
DESCRIP, BUYER, SHIP_VIA, FOB, IS_FREIGHT_PREPAID,
IS_TAXABLE, TERMS_ID, TERMS_CODE,
DISC_DAYS_OR_DATE, DISCOUNT_PCT, NET_DAYS_OR_DATE,
BILL_TO_LOC_ID, SHIP_TO_LOC_ID,
BILL_TO_LOC_CODE, SHIP_TO_LOC_CODE,
DISCOUNT_DATE, DUE_DATE
from P_JRNTRN where
ENTITY_DB_ID = :PRIMARY_DB_ID and
SRC_MODULE = 'PJ'
order by INVOICE_NO

Parameter is Integer.

Error:

select * from P_JRNTRN where
BATCH_ID = :BATCH_ID
order by MASTER_ID

Parameter is Integer.

[UPDATE] ...
I've not been able to resolved this problem so i moved to IBDAC in replacement of the BDE. I get no more error.
Thanks to all.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

梦萦几度 2024-08-19 06:28:34

我也有同样的问题。我使用的是 DataDirect ODBC InterBase 驱动程序。

当我切换到官方的Firebird ODBC驱动程序时,我解决了这个问题。

I had the same problem. I was using DataDirect ODBC InterBase driver.

When I switched to the official Firebird ODBC driver, I solved it.

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