Reputation: 2029
Im try populate grid in Delphi, with values from database. For now, i have a TSQLConnection, TSQLQuery, TDataSource and TDBGrid.
The components are associated as follows:
1) myTDBGrid DataSource: myTDataSOurce
2) myTDataSource DataSet: myTSQLQuery
3) myTSQLQuery Connection: myTSQLConnection
When compile and run a error message broke the application:
Operation not allowed on a unidirectional dataset
Any ideas ?.
Upvotes: 2
Views: 4416
Reputation: 2029
Thanks for all. Im using the next article: Building aVCL Forms dvExpress and works.
Upvotes: 1
Reputation: 47889
This is standard behaviour for dbExpress: all TSQLDataSets are unidirectional and a TDBGrid cannot handle those.
The solution is to use a TClientDataSet connected to a TDataSetProvider, which itself connects to TSQLQuery.
May I suggest reading the dbExpress tutorial?
Upvotes: 5