Using locate method to search for a composite PK
Posted: 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.
Would greatly appriciate any help using Locate or other solutions.
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());