Y
yannanqi
Unregistered / Unconfirmed
GUEST, unregistred user!
我想在程序中将TDBGrid控件动态绑定Ado.RecordSet数据集, 但是总是不成功, 请高手指点:
var
RecordSet: OleVariant;
...
RecordSet:=CreateOleObject('Adodb.RecordSet');
DBGrid1.DataSource:=RecordSet; //提示: Incompatible types: 'TDataSource' and 'OleVariant'
DBGrid1.DataSource:=RecordSet as TDataSource; //提示: Undeclared identifier: 'TDataSource'
var
RecordSet: OleVariant;
...
RecordSet:=CreateOleObject('Adodb.RecordSet');
DBGrid1.DataSource:=RecordSet; //提示: Incompatible types: 'TDataSource' and 'OleVariant'
DBGrid1.DataSource:=RecordSet as TDataSource; //提示: Undeclared identifier: 'TDataSource'