

修改控件ORADC1和MSFlexGrid1的属性,如下图:


ORADC1的Connect属性:user1/pass1
ORADC1的DatabaseName属性:oradb
ORADC1的RecordSource属性:select * from test
MSFlexGrid1的DataSource属性:ORADC1
也可以不设置ORADC1控件的任何属性,而使用窗体的Form_Load()过程来给ORADC1控件赋值
Private Sub Form_Load()
ORADC1.Connect = "user1/pass1"
ORADC1.DatabaseName = "oradb"
ORADC1.RecordSource = "select * from test"
ORADC1.Refresh
End Sub
[责任编辑:editorforddvip]
相关链接
本栏更新