Problems using DATASET.LOCATE 
Author Message
 Problems using DATASET.LOCATE

Hi,

i have a Problem using the locate function

PROCEDURE TRecursiveDetailTable.HandleAfterPost (Dataset : TDataset);
VAR KeyFields : Variant;
BEGIN
  IF RefreshRequired THEN
    Refresh_Pos(MasterSource.Dataset);
  IF NewRecord THEN
  BEGIN
    KeyFields := FieldValues [IndexFieldNames];
    WITH MasterSource DO
    try
      DisableControls;
      Close;
      open;
      Locate (MasterFields, KeyFields, []);
    finally
      EnableControls;
    END;
  END;
  RefreshRequired := False;
  IF Assigned (AfterPost) THEN
    AfterPost (Dataset);
END;   {*** PROCEDURE TRecursiveDetailTable.HandleBeforeInsert; ***}

With this part of Source i allways get an eVariantError-Exception at the
locate function.

Can anyone tell me something about an error.

Thanks
Jens



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Problems using Locate with a query...

2. Problem with BDE and SQL Server using Locate/FindKey

3. 'Locate' method with filtered dataset

4. Correct Syntax for Dataset.Locate?

5. Using Locate on 2 Fields

6. Help using the TTable.Locate command

7. Using Locate on 2 fields

8. Help using LOCATE with delphi 3.02

9. Using Locate method in Delphi 2

10. Using 'Locate' on MSSQL tables

11. Using locate on non-keyfields

12. Locate next using bookmark on paradox7 table

 

 
Powered by phpBB® Forum Software