错误消息“ SQLDA结构内的值不正确”;与Firebird和Delphi 2009 [英] Error message "Incorrect values within SQLDA structure" with Firebird and Delphi 2009

查看:81
本文介绍了错误消息“ SQLDA结构内的值不正确”;与Firebird和Delphi 2009的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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.

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

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

相关delphi代码为:

The relevant delphi code is:

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

我应该在哪里看?

推荐答案

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

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.

您在这里有一些选择:


  1. (推荐,恕我直言)升级到Delphi 2010-除了DBX Firebird驱动程序之外,您还将获得更多的乐趣(请参阅此处了解更多)

  2. 购买Firebird的第三方驱动程序,该驱动程序可在Delphi 2009中使用

  3. 降级您的Firebird(当然,将其作为最后的手段)

  4. 更改连接库。是的,这可能意味着代码将被重写。

  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.

这篇关于错误消息“ SQLDA结构内的值不正确”;与Firebird和Delphi 2009的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆