请教!怎样用datagrid显示recordset中的
在模块中dim adocn as new connection
adocn open "strsql"
sub main()....
form1.show
在form1窗体中cmd中事件中
dim adors as new recordset
adors.activeconnection =adocn
adors.open "strsql"
datagrid1. 怎样设置不会了,窗体中的DATAGRID1不显示数据啊,向您请教???? --------------------编程问答-------------------- Set DataGrid1.DataSource = adors --------------------编程问答-------------------- adocn需要声明为Public吧
datagrid1.datasourc=adors --------------------编程问答-------------------- Set DataGrid1.DataSource = adors
DataGrid1.refresh ' 别忘了刷新 --------------------编程问答-------------------- Set DataGrid1.DataSource = adors --------------------编程问答--------------------
'在模块中
Public adocn as new connection
adocn open "strsql"
'在form1窗体中cmd中事件中
Public adors as new recordset
adors.activeconnection =adocn
adors.open strsql
Set DataGrid1.DataSource = adors
补充:VB , 基础类