Pregunta

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 ?.

¿Fue útil?

Solución 2

Thanks for all. Im using the next article: Building aVCL Forms dvExpress and works.

Otros consejos

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?

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top