模块问题......
Private Sub Form_Load()Set i = New ADODB.Connection
Set j = New ADODB.Recordset
i.ConnectionString = "provider=sqloledb.1;user id=sa;pwd=247162545;initial catalog=sdb;data source=(local)"
i.Open
j.Open "s", i, adOpenDynamic, adLockOptimistic
Set MSHFlexGrid1.DataSource = j
End Sub
这个函数可以用在模块里写吗
怎么写,谢谢~~~~