Search by field disappears when i change the lookup table from a TAdotable to a TAdoquery for a TwwDBLookupComboDlg lookup

Comments

4 comments

  • Roy Woll

    The SearchBy combo only shows fields with an available index.  The ADOQuery does not have any indexes to order with. You could also try using a TADODataSet instead, although I'm not sure it would work. To try this do the following.

    Set the TwwLookupComboDlg.Options so that opShowAllFields is ture.

    Then using the OnInitDialog event, add the following code.

    procedure TMainForm.wwDBLookupComboDlg1InitDialog(Dialog: TwwLookupDlg);
    begin
      dialog.wwKeyCombo1.ShowAllFields:= true;
    end;

     

    1
    Comment actions Permalink
  • Mobo

    Roy Woll Thank you for the reply but the main reason i'm using tadoquery instead of tadotable is because everytime i'm using a tadotable "i get a current provider does not support the necessary interface for index functionality" error . How do i work around this error. Most solutions to this problem are dated back to 2005. i am using delphi 10.4 and sql server 15.0.2080.9

    0
    Comment actions Permalink
  • Roy Woll

    Have you tried my suggestion yet with the two steps?  Also have you considered moving to FireDac to access your ADO tables?

    1
    Comment actions Permalink
  • Mobo

    Roy Woll yes i have tried your two step suggestion. What it did was the search by box showing but it was empty because they are no indexes with tadoquery. Also do you mean Firedac to acess the data in the first place? I have considered that but it would be done down the line and a separate project on its own.

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk