Firedac - Postgresql

I can´t use 'now()' in postgresql to insert a server-database datetime in Firedac.

I'm trying do move from native Postgresql to Firedac, but I have this problem.

Like This :

      DmPrincipal.ADQueryPrincipal.Close;
      DmPrincipal.ADQueryPrincipal.SQL.Clear;
      DmPrincipal.ADQueryPrincipal.SQL.Add('INSERT INTO ');
      DmPrincipal.ADQueryPrincipal.SQL.Add('cte_producao ')
      DmPrincipal.ADQueryPrincipal.SQL.Add('(cadastro_data');
      DmPrincipal.ADQueryPrincipal.SQL.Add('VALUES ');
      DmPrincipal.ADQueryPrincipal.SQL.Add('(:CadastroData');
      DmPrincipal.ADQueryPrincipal.SQL.Add('RETURNING id_cte');
      with DmPrincipal.ADQueryPrincipal do begin
           Params.ParamByName('CadastroData').AsString := 'now()';
      end;
      DmPrincipal.ADConnectionPrincipal.StartTransaction;


This works on native postgredac, oled, zeos, but not in firedac.

Thk´s
0
Leonardo
8/14/2015 11:05:04 PM
embarcadero.delphi.firedac 822 articles. 2 followers. Follow

1 Replies
1074 Views

Similar Articles

[PageSpeed] 55

>            Params.ParamByName('CadastroData').AsString := 'now()';

You should use macros:
http://docwiki.embarcadero.com/RADStudio/XE8/en/Preprocessing_Command_Text_%28FireDAC%29#Substitution_Variables

-- 
With best regards,
Dmitry Arefiev / FireDAC Architect
0
Dmitry
8/18/2015 1:01:01 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 ...

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 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 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 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 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 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 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 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...

Delphi FireDAC SQLite RecNo = -1
RecNo for a FireDAC FDTable in an SQLite database equals -1 even though the cursor is on the last of 1,200,000 records. What is that all about? http://docwiki.embarcadero.com/Libraries/XE7/en/FireDAC.Stan.Option.TFDFetchOptions.LiveWindowParanoic -- With best regards, Dmitry Arefiev / FireDAC Architect ...

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 - Postgresql - embarcadero.delphi.firedac

PostgreSQL - Wikipedia, the free encyclopedia
9.4.1 / February 5, 2015 ; 2 months ago ( 2015-02-05 ) PostgreSQL , often simply "Postgres" , is an object-relational database management system ...

PostgreSQL: The world's most advanced open source database
The official site for PostgreSQL, the world's most advanced open source database

PostgreSQL database fixes “persistent denial-of-service” bug
Maintainers of the PostgreSQL open-source database have patched a vulnerability that allowed attackers to corrupt files and in some cases, execute ...

PostgreSQL dump/restore and client_encoding
... master, then I tried to load the dump via psql into a newly created database on the new master. However, the client_encoding parameter in postgresql.conf ...

postgresql
Read all 'postgresql' posts on .

PostgreSQL 9.3 works well with others
For this year's annual update to PostgreSQL, the developers behind the open source database have added several new ways to communicate with other ...

EnterpriseDB launches PostgreSQL support
Closed-source product takes advantage of open source economy. EnterpriseDB, which sells an Oracle-compatible, PostgreSQL-based database for businesses, ...

Open-Source PostgreSQL 9.3 Wraps Up Data
New developer features and enhanced stability take root in the latest PostgreSQL database release.

homebrew-postgresql
homebrew-postgresql - PostgreSQL formulae for the Homebrew package manager

PostgreSQL Now Available On Amazon’s Relational Database Service - TechCrunch
Amazon Web Services (AWS) launched PostgreSQL on Amazon RDS, showing the strength of the open-source database and its market maturity. CTO Werner ...

Resources last updated: 1/10/2016 5:36:02 PM