Public Property ConnectionString() As String Implements Microsoft.ReportingServices.DataProcessing.IDbConnection.ConnectionString Get Try Return m_innerDBConnExt.ConnectionString Catch ex As Exception Throw ex End Try End Get Set(ByVal value As String) Try 'We need to first parse this Connection String - filtering out what is specific to our Data 'Processing(Extension) before passing it along to the inner extension 'For example: 'Data Source=foo;Initial Catalog=AdWorks;MaxEstRows=10;MaxEstCost=.05 m_innerDBConnExt.ConnectionString = SetWrapperValues(value) Catch ex As Exception Throw ex End Try End Set End Property Private Function SetWrapperValues(ByVal ConnectionString As String) As String Try Dim sConnStringTemp As String = "" Dim sArgName As String, sArgVal As String 'Use the split function to build an String Array of the Connections Args Dim sConnArgs() As String = ConnectionString.Split(";") For i As Integer = 0 To UBound(sConnArgs) 'Each Argument should be in the form of argname=argval ' Get the ArgName and Value (again, using the Split function) sArgName = sConnArgs(i).Split("=")(0).ToLower sArgVal = sConnArgs(i).Split("=")(1) Select Case sArgName Case "maxestrows" m_MaxEstimatedRows = CType(sArgVal, Integer) Case "maxestcost" m_MaxEstimatedCost = CType(sArgVal, Single) Case "commtimeout" m_CommandTimeoutVal = CType(sArgVal, Integer) Case "maxactrows" m_MaxActualRows = CType(sArgVal, Integer) 'Note - I did not implement the logic to enforce this setting as it would of ' required quite a bit more work Case "reportexetimes" 'Note - I did not implement the logic to enforce this setting - but this is ' something you could implement fairly easily within the ExecuteReader method ' of the Command object. m_ReportAllowedExecuteTimes = sArgVal Case Else 'Put it back into the Connection String that will be used 'by the inner connection (and don't forget to reappend the ; sConnStringTemp = sConnStringTemp & sConnArgs(i) & ";" End Select Next 'Remove the final semicolon Return sConnStringTemp.Remove(sConnStringTemp.Length - 1, 1) Catch ex As Exception Throw ex End Try End Function