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
按F5,运行此程序,结果如下图: