Jump to content


Photo

Fast loading of NextDbGrid records


  • Please log in to reply
1 reply to this topic

#1 Nonstop

Nonstop
  • Members
  • 39 posts
  • Gender:Male
  • Location:Arizona, USA

Posted 26 February 2021 - 03:28 AM

I am new to using DBGrids.

 

Currently when I want to add many rows to a NextGrid I use the AddRows(x) feature then load the cells then delete any rows not used.

 

Is there a way to do this on a NextDbGrid using a in-memory database (Developer Express's .TdxMemData is like TClientDataset)

 

I can get it to work doing single appends to the database but I cannot figure out how to add multiple records at once.

When I loop and append many records to the database the speed is terrible..


Steve...

#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,191 posts
  • Gender:Male

Posted 26 February 2021 - 09:21 AM

Hello Steve,

 

Best approach is to add records directly into TDataSet descendant. Then you simply connect it to the Grid. Maybe you will consider using Virtual NextGrid in your case? There you don’t need to add rows if you already have them in some other form (e.g. list).


boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users