Private Sub cmdgetdata_Click()
For i = 0 To lstsoftware.ListCount - 1
If lstsoftware.Selected(i) Then
sSQL = "select * from Master_final"
With adorsRAM
.ActiveConnection = cn
'.CursorLocation = adUseClient
.CursorType = adOpenDynamic
.LockType = adLockOptimistic
.Open sSQL
End With
If Not adorsRAM.EOF Then
Set msh.DataSource = adorsRAM
msh.Refresh
Else
MsgBox "No Records Found in DataGrid!"
msh.Clear
End If
End If
Next i
End Sub
PLEASE CHECK THIS CODE AND TELL ME THE ERRORR IN THE CODE
I AM GETTING THE ERROR:
OPERATION IS NOT ALLOWED WHEN OBJECT IS OPEN
PLEASE REPLY ASAP IT IS URGENT