Dim oConn As New ADODB.Connection Dim rsObj As ADODB.Recordset Dim strConnection As String strConnection = "Provider=MSDASQL.1;Persist Security Info=False;Data Source=dev; password=dev" oConn.Open strConnection rsObj.ActiveConnection = oConn rsObj.Open strQuery, , adOpenDynamic, adLockPessimisticin the datagrid i specify the datasource as the adodc object that is on my form.
adodc.RecordSource = strQActivity adodc.Refreshbut i keep getting errors. i'm sure i'm doing this wrong with not specifying all the necessary properties or something else but i'm new to this and i was hoping for some input from anyone out there. one of the errors is stating "[adodc]: no record source specified. [ado]: command text was not set for the command object but i wasn't using a command object. just the connection object and recordset object. any thoughts would be much appreciated.