Public Function ExecuteQry(ByVal StrText As String) As DataSet Dim AdoDs As New DataSet() Dim SqlDp As New SqlDataAdapter Dim SqlCmd As New SqlCommand Dim SqlParam As New SqlParameter Try SyncLock AdoDs MakeConnect() With SqlCmd .Connection = SqlCon .CommandText = "rExecuteQry" .CommandType = CommandType.StoredProcedure End With SqlParam = SqlCmd.Parameters.AddWithValue("@strText", Trim(StrText)) SqlDp.SelectCommand = SqlCmd SqlDp.Fill(AdoDs) DisposeConnect() Return AdoDs End SyncLock Catch ex As SqlException DisposeConnect() Debug.Write(ex.Message) Finally SqlCmd = Nothing SqlParam = Nothing End Try End Function
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)