Hi,
I am facing a problem in connecting datagrid with ado, the problem occurs in form load event. To further elaborate my problem here is code snippet along with its error message.
Kind Regards,
Error in connecting Datagrid with Ado in Form Load Event
Â
You must make sure that you don't open the recordset in the formload event.
Â
You got an error that the member or the data method was not found. Maybe, you must try out not to open the recordset and modify some of the code in the image given below.
Â
If Not tel_idx is Nothing Then
Â
If tel_idx.State Then tel_idx.Close
Â
End If
Â
tel_idx.CursorLocation = adUseClient
Â
Set tel_idx = con.Execute("SELECT * FROM tel_index where name= '" + Text17.Text + "';")
Â
Set DataGrid2.DataSource = tel_idx
Â
Try adding this.
Â
Cheers.