Solved

DBGrid

Posted on 2001-06-30
4
852 Views
Last Modified: 2008-02-26
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
Comment
Question by:systemop
  • 3
4 Comments
 
LVL 3

Expert Comment

by:alzv
ID: 6240555
Clear Table.DataSource property...

Best regards,
Alexey Zverev.
0
 
LVL 3

Accepted Solution

by:
alzv earned 50 total points
ID: 6240559
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
 
LVL 17

Expert Comment

by:geobul
ID: 6240619
DBGrid.DataSource property to DataSource1 (not to Table1)

Regards, Geo
0
 
LVL 3

Expert Comment

by:alzv
ID: 6241325
Sorry, geobul... You are right... I was mistaken...

Best regards,
Alexey Zverev.
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Delphi: how to send PJL commands to printer 3 108
add combobox item based on numbers 9 154
How to convert memory stream to PDF file 6 108
Multi-layered image in FireMonkey 9 48
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question