开发者

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

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.


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.


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.


maybe you need to use the free dbx driver for firebird

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


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


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜