Error message “Incorrect values within SQLDA structure” with Firebird and Delphi 2009

梦想与她 提交于 2019-12-23 21:25:47

问题


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.


回答1:


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.



回答2:


maybe you need to use the free dbx driver for firebird

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




回答3:


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.




回答4:


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




回答5:


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



来源:https://stackoverflow.com/questions/1852290/error-message-incorrect-values-within-sqlda-structure-with-firebird-and-delphi

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!