Harriv
Harriv

Reputation: 6137

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.

Upvotes: 3

Views: 10602

Answers (5)

Sam Watkins
Sam Watkins

Reputation: 8309

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

Upvotes: 0

Erick Sasse
Erick Sasse

Reputation: 2819

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.

Upvotes: 4

Jeroen Wiert Pluimers
Jeroen Wiert Pluimers

Reputation: 24473

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

Upvotes: 1

Mariuz
Mariuz

Reputation: 1183

maybe you need to use the free dbx driver for firebird

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

Upvotes: 3

John Thomas
John Thomas

Reputation: 4135

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.

Upvotes: 3

Related Questions