Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
setting the datasource for datagrid
hi i would like to appreciate if someone could help me out with my problem with datagrid control in populating it.
here is my code.
Private Sub cmdSearch_Click()
Dim rsTemp As ADODB.Recordset
Dim strSearchBy As Long
Set rsTemp = New ADODB.Recordset
rsTemp.Open "SELECT * FROM subdetails WHERE UserID = '" & txtSearchFor.Text & "'", conn, adOpenDynamic, adLockOptimistic
'rsTemp.Open "Select * from subdetails", conn, adOpenDynamic, adLockOptimistic
Set dtgDetails.DataSource = rsTemp
'Set mflexDetails.DataSource = rsTemp
Public Sub ConnectToDatabase()
Set conn = New ADODB.Connection
conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "database.mdb"
run time error 7004
" the rowset is not bookmarkable ! "
Please try to help me out on this one... thanks
0 · ·