I am connecting a ado with datagrid. Everything works fine till I set the datagrids datasource.
This line gives error -
Set DataGrid1.DataSource = rs
DataGrid1.Refresh
the error is - rowset is not updatable.
Printable View
I am connecting a ado with datagrid. Everything works fine till I set the datagrids datasource.
This line gives error -
Set DataGrid1.DataSource = rs
DataGrid1.Refresh
the error is - rowset is not updatable.
Do you have write access to the data??
--------------------------------------------------------
Option Explicit
Private adoRS As ADODB.Recordset
Private Sub Form_Load()
Set adoRS = New ADODB.Recordset
With adoRS
.ActiveConnection = <your connect string>
.CursorLocation = adUseClient
.LockType = adLockPessimistic
.Source = "Select * from fund"
.Open
End With
Set DataGrid1.DataSource = adoRS
End Sub
--------------------------------------------------------