[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 863
  • Last Modified:

DBGrid

my form has one table, one DataSource and one DBGrid. I made an alias which points to database.mdb. I choose this alias from table. datasource = table1. And DBGrid = datasource1. I have 5 records on my database. But my DBGrid shows 10 records. Which are also same as my 5 record.. How can i solve this?
0
systemop
Asked:
systemop
  • 3
1 Solution
 
alzvCommented:
Clear Table.DataSource property...

Best regards,
Alexey Zverev.
0
 
alzvCommented:
As the description (From Delphi Help):
Table.DataSource
Provides read-only access to the data source for the master dataset when this table is the detail of a master/detail relationship

So, if you have only one table, you do not need to set this property.

You need to set DataSource.DataSet property to Table and DBGrid.DataSource property to Table. Then, if you open your Table, you will see your 5 records in DBGrid...

Best regards,
Alexey Zverev.
0
 
geobulCommented:
DBGrid.DataSource property to DataSource1 (not to Table1)

Regards, Geo
0
 
alzvCommented:
Sorry, geobul... You are right... I was mistaken...

Best regards,
Alexey Zverev.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now