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?
systemopAsked:
Who is Participating?
 
alzvConnect With a Mentor Commented:
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
 
alzvCommented:
Clear Table.DataSource property...

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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.