Hello Everyone,
I am actually new to
VB 6.0 programming. In a small project I am trying to show the entire records of a table,located in Oracle database, in a hierarchichal flexgrid.
But when I set the dataSource property of FlexGrid to the Recordset object, I get "Run Time Error 91, Object Variable or With Block Variable not Set."
following is the code in the Load event of the form containing the FlexGrid.
Private Sub Form_Load()
Dim adoConn As New ADODB.Connection
Dim ConnectionString As String
adoConn.CursorLocation = adUseClient
ConnectionString = "Provider=MSDAORA; user id= scott; password= tiger;"
adoConn.Open ConnectionString
Dim adoRecSet As New ADODB.Recordset
adoRecSet.CursorType = adOpenDynamic
adoRecSet.LockType = adLockOptimistic
adoRecSet.Open "employee1", adoConn, , , adCmdTable
Set MSFlexGrid1.DataSource = adoRecSet
End Sub
Any help will be Highly Appreciated..
Thanks a Ton in advance.