Currently doing some tests with Delphi 2010 trial and firebird with the express driver from http://groups.google.com/group/dbxfirebird/
I ran into the following problem at first :
I had a username and a password that is encrypted from inside my applicatio with AES. Encrypting, decrypting works fine. The moment i sent it to the database it got screwed up since it was not in UTF8. I created a new database UTF8, problem fixed. But the next problem came up.
Whenever i try to save an empty string into a field i get TDBXError malformed string. When there is 1 character in my string everything works fine. I also did some testing with DB tools and manually inserting strings etc. No problems at all. So it definitely is not a firebird problem
I'll give a small example on how i setup everything:
- TSQLConnection with normal parameters like
- username, password
- dbx ini file, where all info is stored about my connection
- a firebird database file .dbf (UTF8)
- 1 table test
PK_ID primary key varchar(40) - a guid NOT NULL
F_NAME varchar(50)
F_DESCRIPTION varchar(1000) - something
- i create a insert statement and use the parameters
INSERT INTO test (PK_ID, F_NAME, F_DESCRIPTION) values (:AID, :ANAME, :ADESC);
ParamByName('AID').AsString := myobject.id;
ParamByName('ANAME').AsString := myobject.name;
ParamByName('ADESC').AsString := myobject.description;
When name or description is empty i will get "TDBXError malformed string". When both have at least 1 character in it, it works like a charm. Does anyone have an idea on how to fix, circumvent this problem
I also tried some UTF8Encode functions etc on myobject.name etc. Why do i use the parameters you might ask ... We have a factory which allows you to bind an object to a dataobject and by using that, we have to write alot less code, since same parameters are being used in update/insert
SideNote : The company i am currently freelancing is upgrading to Delphi 2007 in about a month, but i am trying to push for 2010 :). And i also went to get rid of Visual Source Disaster and access.