N/APosted on - 08/29/2011
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.
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
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.