错误消息“SQLDA 结构中的值不正确”与 Firebird 和 Delphi 2009

发布于 2024-08-14 02:14:03 字数 397 浏览 7 评论 0原文

当我尝试从 Delphi 2009 DBX 应用程序更新 Firebird 2.1 数据库中的 blob 字段时,我遇到了错误消息“SQLDA 结构中的值不正确”。

但是,当我尝试使用以下 SQL 执行 TSQLQuery 时,我收到错误消息:“update MYTABLE set FIELD1= :data where id = :id”

相关的 delphi 代码是:

MyQuery.ParamByName('id').AsInteger := id;
MyQuery.ParamByName('data').LoadFromFile(filename, ftBlob);
MyQuery.ExecSQL();

我应该在哪里查找?这在早期的 Delphi 版本中一直有效。

I'm strugling with error message "Incorrect values within SQLDA structure" when I'm trying to update blob field within Firebird 2.1 database from Delphi 2009 DBX application.

However I get the error message when I'm trying to execute TSQLQuery with following SQL: "update MYTABLE set FIELD1= :data where id = :id"

The relevant delphi code is:

MyQuery.ParamByName('id').AsInteger := id;
MyQuery.ParamByName('data').LoadFromFile(filename, ftBlob);
MyQuery.ExecSQL();

Where should I be looking? This has been working in earlier Delphi versions.

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

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

发布评论

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

评论(5

天涯离梦残月幽梦 2024-08-21 02:14:03

这是 Delphi 的 Interbase 驱动程序用来显示的加密错误类型。

当 SQL 语句中的参数数量与查询组件中定义的参数数量不同时,我就遇到过这个问题。

This is the kind of crypt error that Delphi's Interbase driver is used to show.

I've seen this problem when you have different numbers of parameters in your SQL statement and the ones defined in your query component.

难理解 2024-08-21 02:14:03

仔细检查您的驱动程序 - 它是用于 Firebird,还是您只是使用 Interbase 驱动程序?据了解,Firebird 团队在 2.1 中更改了 Blob 的 SQLDA 结构,因此无法再使用 Interbase 驱动程序。

您在这里有一些选择:(

  1. 推荐,恕我直言)升级到 Delphi 2010 - 除了 DBX Firebird 驱动程序之外,您还将获得更多可以使用的东西(请参阅 这里了解更多)
  2. 购买适用于 Delphi 2009 的 Firebird 的第 3 方驱动程序
  3. “降级”您的 Firebird(将其作为最后的手段) ,当然)
  4. 更改您的连接库。是的,这可能意味着代码重写。

Double check your driver - it is for Firebird or you just use the Interbase driver for this?. It is known that the Firebird team changed the SQLDA structure for Blobs in 2.1 and, hence, the Interbase driver cannot be used anymore.

You have some options here:

  1. (recommended, imho) Upgrade to Delphi 2010 - besides of a DBX Firebird driver you will get much more things to play with (see here for more)
  2. Buy a 3rd party driver for Firebird which works in Delphi 2009
  3. 'Downgrade' your Firebird (use it as a last resort, of course)
  4. Change your connectivity library. Yes, it might imply code rewrite.
柠檬色的秋千 2024-08-21 02:14:03

也许您需要使用 firebird 的免费 dbx 驱动程序

http://sites.google.com/site/ dbxfirebird/

maybe you need to use the free dbx driver for firebird

http://sites.google.com/site/dbxfirebird/

☆獨立☆ 2024-08-21 02:14:03

首先想到的是确保客户端 dll(gds32.dll 或 fb32.dll 或 fbclient.dll,名称取决于您使用的 Firebird 版本)与您使用的服务器版本完全匹配。

——杰罗恩

The first thing that comes to mind is to make sure that the the client dll (gds32.dll or fb32.dll or fbclient.dll, the name depends on which version of Firebird you are using) exactly matches the server version you are using.

--jeroen

初见你 2024-08-21 02:14:03

FWIW,当需要它们时,我通过在没有绑定变量的情况下执行语句来在 perl 程序中遇到此错误。

FWIW, I got this error in a perl program by executing a statement without bind variables, when it needed them.

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