FireDac Delphi Xe2

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.
0
Sebastian
1/7/2015 9:13:09 PM
embarcadero.delphi.firedac 822 articles. 2 followers. Follow

9 Replies
1103 Views

Similar Articles

[PageSpeed] 6

To set the Param on NULL value before executing the query I do:

{code}
with qryExample.ParamByName('Example_id') do
Begin
  DataType:=ftInteger;
  Clear;
  // Bound := True;
End;
{code}
0
Robert
1/8/2015 9:52:03 AM
> {quote:title=Robert Triest wrote:}{quote}
> To set the Param on NULL value before executing the query I do:
> 
> {code}
> with qryExample.ParamByName('Example_id') do
> Begin
>   DataType:=ftInteger;
>   Clear;
>   // Bound := True;
> End;
> {code}


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
0
Sebastian
1/8/2015 2:24:11 PM
Can someone help , it's an important issue for me
0
Sebastian
1/12/2015 10:41:51 AM
> {quote:title=Sebastian Kumor wrote:}{quote}
> 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.
0
Robert
1/12/2015 12:54:33 PM
> {quote:title=Robert Triest wrote:}{quote}
> > {quote:title=Sebastian Kumor wrote:}{quote}
> > 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
{code}
    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;
{code}

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
0
Sebastian
1/12/2015 1:43:02 PM
Maybe you can do something with a stored procedure on the database after post..
0
Robert
1/12/2015 2:30:23 PM
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.
>
0
quinn
1/12/2015 5:26:08 PM
> {quote:title=quinn wildman wrote:}{quote}
> 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.
0
Sebastian
1/13/2015 7:13:24 AM
> {quote:title=Robert Triest wrote:}{quote}
> 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
0
Sebastian
1/13/2015 7:59:21 AM
Reply: