Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: FireDac Delphi Xe2



Permlink Replies: 9 - Last Post: Jan 12, 2015 11:59 PM Last Post By: Sebastian Kumor
Sebastian Kumor

Posts: 22
Registered: 10/19/11
FireDac Delphi Xe2
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 7, 2015 1:13 PM
Hello,
I have FireDac components installed to Delphi Xe2,
My version of FireDac is 8.0.1 but in this version I have probelm with TAdoquery with StrsEmpty2Null param.
It doesn't work. Maybe someone know what I have to change in FiredAc source to remove this issue.
Robert Triest

Posts: 687
Registered: 3/24/05
Re: FireDac Delphi Xe2
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 8, 2015 1:52 AM   in response to: Sebastian Kumor in response to: Sebastian Kumor
To set the Param on NULL value before executing the query I do:

with qryExample.ParamByName('Example_id') do
Begin
  DataType:=ftInteger;
  Clear;
  // Bound := True;
End;
Sebastian Kumor

Posts: 22
Registered: 10/19/11
Re: FireDac Delphi Xe2
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 8, 2015 6:24 AM   in response to: Robert Triest in response to: Robert Triest
Robert Triest wrote:
To set the Param on NULL value before executing the query I do:

with qryExample.ParamByName('Example_id') do
Begin
  DataType:=ftInteger;
  Clear;
  // Bound := True;
End;

I need to insert string variable as '' (empty string), but FireDac inserts null

The problem is that version 8.0.1 have a bug
component does not support parameter StrsEmpty2Null
according to the documentation should be set to False and save '' ,but he writes Null

Apparently the problem is solved in FireDac 8.0.5 but I don't know where to download
this amendment.

Maybe someone knows what to change in the sources of version 8.0.1 to work correctly

Sebastian Kumor

Posts: 22
Registered: 10/19/11
Re: FireDac Delphi Xe2
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 12, 2015 2:41 AM   in response to: Sebastian Kumor in response to: Sebastian Kumor
Can someone help , it's an important issue for me
Robert Triest

Posts: 687
Registered: 3/24/05
Re: FireDac Delphi Xe2
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 12, 2015 4:54 AM   in response to: Sebastian Kumor in response to: Sebastian Kumor
Sebastian Kumor wrote:
Can someone help , it's an important issue for me

To understand a bit more about this.. How does this work?
You create an insert or update sql statement with params and that param
is then automatically filled with a NULL value?

Normally I create a statement and then declare the params and execute the query.
When declaring the params I do ParamByName('MyFieldName').AsString:='';

Does this not working in that FireDac version or what is the situation in your case?

Thanks.
Sebastian Kumor

Posts: 22
Registered: 10/19/11
Re: FireDac Delphi Xe2
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 12, 2015 5:43 AM   in response to: Robert Triest in response to: Robert Triest
Robert Triest wrote:
Sebastian Kumor wrote:
Can someone help , it's an important issue for me

To understand a bit more about this.. How does this work?
You create an insert or update sql statement with params and that param
is then automatically filled with a NULL value?

Normally I create a statement and then declare the params and execute the query.
When declaring the params I do ParamByName('MyFieldName').AsString:='';

Does this not working in that FireDac version or what is the situation in your case?

Thanks.

Yes I give you some example

// modalna.ibq is TADQuery from FireDac components
    modalna.ibq.Close;
   modalna.ibq.sql.Clear;
   modalna.ibq.sql.Add('insert into KAPITAL_FUND (Id_skl,Id_ok,Skladnik) values (:d0,:d1,:d2);');
   modalna.ibq.params[0].AsInteger:=id_s;
   modalna.ibq.params[1].AsInteger:=strtoint(Idk_n);
   modalna.ibq.params[2].Asstring:='';
   modalna.ibq.ExecSQL;


In Skladnik column I get null value instead of empty string ''
TADQuery have a property StrsEmpty2Null , but in my version of FireDac (8.0.1) is a bug.
I read that this issue have been solved in FireDac 8.0.5

Now I don't know where to download it or what to change in FireDac source to remove this bug
Robert Triest

Posts: 687
Registered: 3/24/05
Re: FireDac Delphi Xe2
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 12, 2015 6:30 AM   in response to: Sebastian Kumor in response to: Sebastian Kumor
Maybe you can do something with a stored procedure on the database after post..
Sebastian Kumor

Posts: 22
Registered: 10/19/11
Re: FireDac Delphi Xe2
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 12, 2015 11:59 PM   in response to: Robert Triest in response to: Robert Triest
Robert Triest wrote:
Maybe you can do something with a stored procedure on the database after post..

Yes I`ve thought about it. I have a lot of places where I would have to do it, but eventually I will.
Thanks for the suggestion
quinn wildman

Posts: 856
Registered: 12/2/99
Re: FireDac Delphi Xe2
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 12, 2015 9:26 AM   in response to: Sebastian Kumor in response to: Sebastian Kumor
I would suggest you download the trial edition of XE7 and see if the
problem happens there. This will at least let you know if your issue has
been resolved since XE2. I would suggest that if go this route, do not
install any of the third party options or mobile. You might consider not
installing help as well. You can modify your install and add them these
options later if need be. This will make your install time be
significantly less.

Sebastian Kumor wrote:
Hello,
I have FireDac components installed to Delphi Xe2,
My version of FireDac is 8.0.1 but in this version I have probelm with TAdoquery with StrsEmpty2Null param.
It doesn't work. Maybe someone know what I have to change in FiredAc source to remove this issue.
Sebastian Kumor

Posts: 22
Registered: 10/19/11
Re: FireDac Delphi Xe2
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 12, 2015 11:13 PM   in response to: quinn wildman in response to: quinn wildman
quinn wildman wrote:
I would suggest you download the trial edition of XE7 and see if the
problem happens there. This will at least let you know if your issue has
been resolved since XE2. I would suggest that if go this route, do not
install any of the third party options or mobile. You might consider not
installing help as well. You can modify your install and add them these
options later if need be. This will make your install time be
significantly less.

Sebastian Kumor wrote:
Hello,
I have FireDac components installed to Delphi Xe2,
My version of FireDac is 8.0.1 but in this version I have probelm with TAdoquery with StrsEmpty2Null param.
It doesn't work. Maybe someone know what I have to change in FiredAc source to remove this issue.

I have installed FireDac components to my Xe2 additional.
Yes I downloaded Xe7 and this issue is removed there.
Also according to this documentation http://blogs.embarcadero.com/matthiaseissing/2013/06/21/38734
8.0.5 version is repaired.
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02