views:

415

answers:

4

Hi,

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.

+2  A: 

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  A: 

maybe you need to use the free dbx driver for firebird

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

Mariuz
+1  A: 

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

Jeroen Pluimers
+1  A: 

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.

Erick Sasse