Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8441045
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T08:27:47+00:00 2026-06-10T08:27:47+00:00

I have to convert many Excell files (converted to CSV ) to the database

  • 0

I have to convert many Excell files (converted to CSV) to the database layout of my application.

In my table there are some fields that uses foreign keys for other tables lists and when my convert code finds a field like that, it does not have the foreign id, but the simple text typed on the Excell.

I find that at the moment, the best approach is to insert a new row, focus that TDBLookupComboBox field and then send messages through SO to simulate that I am typing the text. The ComboBox autocomplete feature will then select the right item on the foreign list.

If this is the best way, how do I do that? To send these keyboard messages using Delphi 2006 and Firebird?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T08:27:48+00:00Added an answer on June 10, 2026 at 8:27 am

    Instead of “emulating” a user, you should do what the component does by code. It uses the TDataSet.Locate method to find the partial string and sets the DataSet cursor to the found record. Then it uses the lookup source to get the value.

    var
      SearchString: string;
    begin
      SearchString := 'Dat';
      if LookupDataSet.Locate('MySearchField', SearchString, [loCaseInsensitive, loPartialKey]) then
      begin
        DestDataSet.Edit;
        DestDataSet.FieldByName('FLD_ID').AsInteger := LookupDataSet.FieldByName('FLD_ID').AsInteger;
        // DestDataSet.Post;
      end
      else
        raise Exception.CreateFmt('Lookup value not found for "%s"', [SearchString]);
    end;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have many different csv files that I would like to convert in to
I have many html files in nested directories which I need to convert to
I have 3 table in SQL that have many-to-many relation.The first table account have
I have many MOV files recorded with iPhone and I want to convert them
I have used many of the Convert.To..... functions for conversion , but I didn't
I have many strings like 20120117 and 20120321. I need to convert it in
I have to convert an incoming String field into a BigDecimal field that would
I have a pretty big web application that I created last year using ASP.NET
I've got some code to convert a large (many gigabytes) XML file into another
I have many aspx page includes in my web form. I want to convert

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.