Hi truerad21, try the following code:
Note:Code:Private Sub Form_Load() If CreateConnection Then Dim recSet As cRecordset Dim SQLStr As String SQLStr = "select * from vi_sample" Set recSet = DBConn.OpenRecordset(SQLStr, True) If recSet.RecordCount <> 0 Then Set MSHFlexGrid1.DataSource = recSet.GetADORsFromContent.DataSource End If End If End Sub
Note: The above code does not need to explicitly (early) reference the Microsoft ActiveX Data Objects Library.




Reply With Quote