Re: Populate dataset with text file




Dan Rock wrote:

> Commenting out the inserts, It takes about 45 seconds to populate a
> text box one row at a time. If I use Memo1.Lines.LoadFromFile I can

I assume that the 45 seconds includes assigning each record to the
TStringList.DelimitedText property to parse it. If so that proves that
the performance problem is not with the import but with inserting the
records into the database.

> populate a memo control in less than a second.

That is a meaningless comparison since most of the time required by the
import is the time to parse the record on the asterisk delimiter and
loading the file into a memo does not do this.

>
> If I can find a way to simple either make a temp table or populate an
> existing table using the asterisk as a field delimiter, I am thinking
> it should take considerably less time than populating a dataset one
> record at a time.

What component are you using to insert the record? If you are using a
query component, what is the SQL?

It might help to see the actual code.

--
Bill Todd (TeamB)
.