Anyone experienced this error? and how to resolve? Below is my sample code. My sql query has subquery and the Saleslogix ConnectionString does not support Subquery. In my code I am using SQL Native Client Connection.
Dim cnn
Dim rs
Dim cmd
Dim fld
Dim col
Set cnn = CreateObject("ADODB.Connection")
Set rs = Application.CreateObject("ADODB.Recordset")
rs.CursorLocation = adUseClient
rs.CursorType = adOpenStatic
rs.LockType = adLockOptimistic
cnn.ConnectionString =GetNativeConnection()
cnn.Open
Set rs = cnn.Execute(startQuery)
For Each fld In rs.Fields
Set col = grdTransactions.Columns.Add(0)
col.FieldName = fld.Name
col.Width=100
col.Caption = fld.Name
Next
set grdTransactions.Recordset = rs '<---This part I get an error
rs.Close |