Using locate method to search for a composite PK

Discussion of open issues, suggestions and bugs regarding PgDAC (PostgreSQL Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Gugge
Posts: 1
Joined: Mon 18 Feb 2019 15:36

Using locate method to search for a composite PK

Post by Gugge » Sun 07 Apr 2019 13:43

Hello

I'm using RAD Studio v10.2 and PgDac 5.3.9

I'm attempting to check wether a primary composite key exists or not, if it exists i want to move the cursor to its position.

The code works if i look up one of the two, but not both.

Code: Select all

AnsiString colNames;
		Boolean PKExist;
                colNames="component_id; detail_type";
		locvalues[0]=Variant(1);
		locvalues[1]=Variant("Test");
		PKExist=PgTable2->Locate(colNames,locvalues,TLocateOptions());
Would greatly appriciate any help using Locate or other solutions.

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: Using locate method to search for a composite PK

Post by MaximG » Tue 09 Apr 2019 12:10

We could not reproduce the issue according to your description. For further investigation, please compose and send us a project, execution of which causes the issue. It is convenient to do it using the e-support form (https://www.devart.com/company/contactform.html) In addition, we will need DDL script to create DB objects used in this sample.

Post Reply