FireDAC exception - Data type is unknown

Hello.

In an application built with Delphi XE6, which accesses an Informix database, the following exception is raised:
*Project app.exe raised exception class EFDException with message '[FireDAC][Phys][Infx]-335. Parameter [CASHIER] data type is unknown. Hint: specify TFDParam.DataType or assign TFDParam value before Prepare/Execute call'*

The query associated with the exception is the following:
{code}
with CashierQuery do
  begin
    if not Prepared then
    begin
      SQL.Clear;
      Connection := FDManager.Connections[0];
      SQL.Add('select *');
      SQL.Add('  from table1');
      SQL.Add('  where col1 = :cashier');
      SQL.Add('        and col2 = store');
      SQL.Add('        and col3 = register');
      Prepared := True;
    end;
    if CashierQuery.Active then
      CashierQuery.Close;
    Params[0].AsString := FCashier;
    CashierQuery.Open;
{code}

Although the exception provides a hint to solve the problem, I was wondering if there is an alternate (an maybe more efficient) solution to solve the problem. 
I explain: the mentioned application, which is being converted from BDE to FireDAC, has innumerous queries implemented this way.

Thank you in advance.
0
Paulo
7/17/2014 7:04:41 PM
embarcadero.delphi.firedac 822 articles. 2 followers. Follow

1 Replies
1700 Views

Similar Articles

[PageSpeed] 40

{code}
       Prepared := True;
{code}

Just remove this line. The query will be automatically prepared on first Open call.

-- 
With best regards,
Dmitry Arefiev / FireDAC Architect
0
Dmitry
7/18/2014 10:42:32 AM
Reply:

Similar Artilces:

FireDAC and Delphi Pro XE4... firedac tab not visible?
I am moving from a very old Borland product (2006) to Delphi XE4 Professional with FireDAC addon. I purchased both from Embarcadero, and have downloaded both. The documentation says the FireDAC components should automagically appear in the tabset for Delphi. They do not. I don't want to fool around too much as my environment is strictly controlled by IT, and they are very slow to do anything. Is there something that I should have done, but did not do? I installed XE4 first, registered it, then used the link in my email from Embarcadero to download the FireDAC components. Then I ra...

FireDac
Hello, I am using Delphi XE4 and facing a problem with FireDac (8.0.5) and MySQL. I'm trying to get the last 100 records from a large table (20 million rows). When I run the following SQL: {code}select * from largetable order by FId limit 100{code} in MySQL Workbench it returns in 0.2 seconds. When I run the above SQL in Delphi through an ADQuery it never returns (Delphi freezes). Any Ideas ? Thank you ...

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. 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} > {quote:title=Robert Triest wrote:}{quote} > To set the Param on NULL value before executing the query I do: >...

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. 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} > {quote:title=Robert Triest wrote:}{quote} > To set the Param on NULL value before executing the query I do: >...

It is FireDAC after all
Marco announces FireDAC: http://blog.marcocantu.com/blog/firedac_announced.html -- Nick The Buy Now button almost work ;-) > {quote:title=Nick Hodges wrote:}{quote} > Marco announces FireDAC: > > http://blog.marcocantu.com/blog/firedac_announced.html > That was fast :) delete this message > What's the price for XE3 Pro licensees? Introductory price is $399 -- With best regards, Dmitry Arefiev / FireDAC Architect http://www.embarcadero.com/products/rad-studio/firedac > All the links I found just go to a page that lets you purchase Delp...

FireDAC TADScript Exceptions
Hello... I am testing TADScript for update my databases in my customers... using Firebird 2.5 , Delphi XE4, FireDAC version is 8.0.5 Build 3365. here my simple code: {code} procedure TForm1.ADScript1ConsolePut(AEngine: TADScript; const AMessage: string; AKind: TADScriptOuputKind); begin Memo1.Lines.Add(AMessage); end; procedure TForm1.ADScript1Error(ASender: TObject; const AInitiator: IADStanObject; var AException: Exception); begin Memo2.Lines.Add('=========================================================='); Memo2.Lines.Add( TADScript(ASender).CallS...

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 ro remove this issue. I suggest to the FireDAC newgroup. You'll probably get a better response there. 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. Mayb...

FireDAC for Delphi 2007 ?
Hello, I would like to know if FireDAC Client/Server Pack can be installed on Delphi 2007 pro. Thanks, Regards, Emmanuel Lion FireDAC Client/Server Pack for XE5 - No FireDAC Client/Server Pack for XE4/XE3, see: http://support.embarcadero.com/article/42970 M. E.L. wrote: > Hello, > > I would like to know if FireDAC Client/Server Pack > can be installed on Delphi 2007 pro. > > Thanks, > Regards, > > Emmanuel Lion > On 02.10.2013 18:17, quinn wildman wrote: > FireDAC Client/Server Pack for XE5 - No > FireDAC Client/Server Pack ...

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 ro remove this issue. I suggest to the FireDAC newgroup. You'll probably get a better response there. 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. Mayb...

FireDAC?
I'm starting a new development initiative and want to pick the tech that will last the longest and have the most complete feature set. Elsewhere someone noted that DBExpress has been deprecated in favour of FireDAC. I seem to have missed the announcement of FireDAC. So I'm looking for any info on what FireDAC is and why I should use it. Any links? I just discovered the FireDAC newsgroup and the first message there is an announcement with links to the product info and documentation. So my basic question (What is it?) is answered. Still don't know the future of DBExpr...

Firedac for Delphi XE Pro
Will the XE4 Client Server Pack for FireDac work properly with Delphi XE Professional? Will that provide the full Firedac functionality or is it limited? Is it dependent on functionality in the Enterprise product which is not in the Professional? And finally, will I have the license rights to market and sell the application I create? I understand it does not require dbexpress which has certain restrictions, correct? I would like to be able to evaluate it in an XE environment without upgrading everything just to try and work with it. Patrick Moloney wrote: > Will the XE4 Client Serve...

FireDAC for Delphi Pro XE4
Hi, Being a Delphi Pro XE4 user with a valid FireDAC subscription, where can I download FireDAC for Delphi Pro XE4? Thanks, Luk Luk Smolders wrote: >Being a Delphi Pro XE4 user with a valid FireDAC subscription, where >can I download FireDAC for Delphi Pro XE4? I got mine from https://cc.embarcadero.com/item/29369 Cheers, Nick -- Sent from my XanaNews v1.19.1.373 > {quote:title=Nicholas Ring wrote:}{quote} > Luk Smolders wrote: > > >Being a Delphi Pro XE4 user with a valid FireDAC subscription, where > >can I download FireDAC for Delp...

FireDAC XE5 with Delphi XE
I have Delphi Enterprise XE5 and XE, and use both for various projects. Is it possible to use the new FireDAC that comes with XE5 (v9.x I believe) with Delphi Enterprise XE? If so, how do I obtain the standalone FireDAC XE5 installer? I have an active RAD Studio Enterprise software assurance plan. I've looked for FireDAC XE5 in my registered users download section, but I can't find anything for FireDAC XE5. I can only find downloads for FireDAC XE4. Regards, -Kevin Hello Kevin > Is it possible to use the new FireDAC that comes with XE5 (v9.x I > believe) wi...

FireDac in Delphi XE5 Pro
Does FireDac in delphi xe5 Pro (without any add-ins) provide any useful functionality ? Based upon what I've read, it seems to offer an alternative (better)?) means to link to Access and MySQL when they are installed on the same PC. Pete K FireDAC does SQLite w/ encryption on Windows. Peter Kane wrote: > Does FireDac in delphi xe5 Pro (without any add-ins) provide any > useful functionality ? Based upon what I've read, it seems to offer > an alternative (better)?) means to link to Access and MySQL when they > are installed on the same PC. > > Pete...

What Delphi versions the latest FireDac supports?
I'm using Delphi XE4. If I buy the latest FireDac, will it support that Delphi version? There is no mention of that in the sales docs. Please add such information. But when it was AnyDac, it always continued supporting old versions so one could buy at any point and use it. This means that if I missed buying FireDAC earlier with Delphi XE4, I have to spend extra money to upgrade to the latest Delphi just for that even when I don't need the newer Delphi? Isn't it a faulty policy? All other Delphi third party components continue supporting old Delphi versions. Another question: ...

Web resources about - FireDAC exception - Data type is unknown - embarcadero.delphi.firedac

Motor vehicle exception - Wikipedia, the free encyclopedia
The exception is based on the idea that there is a lower expectation of privacy in motor vehicles due to the regulations they operate. Additionally, ...

Podcast #42 – It’s The Exception That Proves The Rule
... Language and Usage , which was frustrated by the high number of certain types of questions that were coming in. Is this podcast the exception ...

RWW News: Marco Rubio Reiterates His Opposition To Rape Or Incest Exceptions - YouTube
http://www.rightwingwatch.org/content/marco-rubio-reiterates-his-opposition-rape-or-incest-exceptions Right Wing Watch reports on the extreme ...

Can Tunisia, the 'Arab exception', hold on to democractic ideals amid turmoil?
The terrorist attack on the Bardo Museum, in Tunis, represents yet another episode of senseless, barbaric violence in the name of Islam.

Bike thefts spike in exception to drop in crime
... level in nine years, with a 28 per cent jump in three months. Bicycle thefts have soared to their highest level in nine years, a rare exception ...

Many rugby films wind up in dead ball area but The Ground We Won is an exception
If rugby is the game they play in heaven, rugby movies generally come from a lesser place.

Most consumers better off after carbon tax scrapped – with one possible exception
Households are roughly $550 a year better off since the scraping of the carbon tax, but air travellers may wonder if they are being overcharged, ...

Men Need to Admit That Jian Ghomeshi Is No Exception
That men like Jian Ghomeshi are a terrible exception and if we as men simply stand up and say we are not as bad as that, or that we are not rapists ...

China, Thailand reach visa exception agreement
China, Thailand reach visa exception agreement People's Daily Online ... this at a forum on China's foreign diplomacy held in Beijing. Both ...

No exception allowed in graft crackdown: People's Daily
No exception allowed in graft crackdown: People's Daily - Ecns.cn ecns The expulsion of Ling Jihua from the Communist Party of China (CPC) ...

Resources last updated: 1/15/2016 10:24:29 AM