-
Please help
What wrong with this code
I got error "the rowset is not bookmarkable"
Private Sub Form_Load()
Dim cn As new ADODB.Connection
cn.Open "DSN=mydsn"
Dim rs As New ADODB.Recordset
rs.ActiveConnection = cn
rs.Source = "select * from authors where [year born]>1943"
rs.Open
Set DataGrid1.DataSource = rs
rs.Close
cn.Close
Set rs = Nothing
Set cn = Nothing
End Sub
-
on what line did you get the error?
-
Specify type to open
You must specify how to open the recordset....
static usually works best in grids
like:
rs.open SomeString, cn, adOpenStatic
/Patrick