abdate
asked on
How to set Query's property DataSource with null source?
I set Query's Property DataSource for linking to Master Table,
such as: Query1.DataSource:=DataSou rce1.
But in running time, sometimes I want Query1 working independing.
Therefore I have to release this Master/Detail relation.
I wrote Query1.DataSource:='', and got compiler error.
Anyone can tell me how to define Query's property DataSource for a null source?
Thanks!
ps:When I define Query1.DataSource:=DataSou rce2,which DataSource2 point to nothing table.
And it is working, but I know it is not good method.
such as: Query1.DataSource:=DataSou
But in running time, sometimes I want Query1 working independing.
Therefore I have to release this Master/Detail relation.
I wrote Query1.DataSource:='', and got compiler error.
Anyone can tell me how to define Query's property DataSource for a null source?
Thanks!
ps:When I define Query1.DataSource:=DataSou
And it is working, but I know it is not good method.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Yes!It works.
Thanks!!
Thanks!!
you can define another datasource as say you
or
you can use this work (closing the query1)
with query1.close the last data in dbgrid is disappeared
but about null datasource in delphi help:
All datasets must be associated with a data source component if their data is to be displayed and manipulated in data-aware controls. Similarly, each data-aware control needs to be associated with a data source component in order for the control to receive and manipulate data.
best regards
m.reza