2013/9/5 Michael Van Canneyt
> On Thu, 5 Sep 2013, silvioprog wrote:
>
>> Thank guys, fixed with:
>>
>> q.SQL.Add('where t1.id::text = :id');
>>
>
> I recommend against this.
>
> It will do the conversion for each record that is tested. This takes time.
>
> If you do the conversion on the paramet
On Thu, 5 Sep 2013, silvioprog wrote:
Thank guys, fixed with:
q.SQL.Add('where t1.id::text = :id');
I recommend against this.
It will do the conversion for each record that is tested. This takes time.
If you do the conversion on the parameter, it will be done only once, when the
paramete
Thank guys, fixed with:
q.SQL.Add('where t1.id::text = :id');
I'll do this change in all units of my project. :/
--
Silvio Clécio
My public projects - github.com/silvioprog
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freep
Michael Van Canneyt wrote / napísal(a):
On Wed, 4 Sep 2013, silvioprog wrote:
Hello,
I can't understand how to open a query filtering by a field of type
GUID.
The error message is below (translated from BR to US):
TPQConnection: Preparation of query failed. (PostgreSQL: ERROR:
operator
On Wed, 4 Sep 2013, silvioprog wrote:
Hello,
I can't understand how to open a query filtering by a field of type GUID.
The error message is below (translated from BR to US):
TPQConnection: Preparation of query failed. (PostgreSQL: ERROR: operator does
not exist: uuid = text
LINE 3: where t1
I am not an expert of PostGres but maybe you are missing the doubled quotes?
q.Params.ParamByName('id').AsString :=
''71d6776e-1564-11e3-ad65-5349928f15b0'';
Cheers, A.
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepasc