Click here to Skip to main content
15,926,062 members
Home / Discussions / C#
   

C#

 
QuestionTelerik WinForm Library? Pin
Jörgen Sigvardsson19-Aug-09 1:07
Jörgen Sigvardsson19-Aug-09 1:07 
AnswerRe: Telerik WinForm Library? Pin
Piratenwichtl200019-Aug-09 1:31
Piratenwichtl200019-Aug-09 1:31 
GeneralRe: Telerik WinForm Library? Pin
Jörgen Sigvardsson19-Aug-09 1:34
Jörgen Sigvardsson19-Aug-09 1:34 
GeneralRe: Telerik WinForm Library? Pin
Piratenwichtl200019-Aug-09 1:56
Piratenwichtl200019-Aug-09 1:56 
GeneralRe: Telerik WinForm Library? Pin
Jörgen Sigvardsson19-Aug-09 2:01
Jörgen Sigvardsson19-Aug-09 2:01 
GeneralRe: Telerik WinForm Library? Pin
ManniAT21-Aug-09 7:46
ManniAT21-Aug-09 7:46 
QuestionReporting Services - How to define the WHERE clause dynamically ? Pin
davebarkshire19-Aug-09 0:43
davebarkshire19-Aug-09 0:43 
AnswerRe: Reporting Services - How to define the WHERE clause dynamically ? Pin
Eddy Vluggen19-Aug-09 2:44
professionalEddy Vluggen19-Aug-09 2:44 
You'd get more responses from the database-forum. I haven't used the Reporting Services yet, but I guess that they can use a function or sproc as a datasource. I usually use a construction that's comparable to this;
DECLARE @TEST AS TABLE
	(FieldOne VARCHAR(10))
INSERT INTO @TEST VALUES('Hello')
INSERT INTO @TEST VALUES('World')

DECLARE @ArgumentForFieldOne AS VARCHAR(10)
    SET @ArgumentForFieldOne = 'He%'
	
SELECT *
  FROM @TEST
 WHERE (
           (@ArgumentForFieldOne IS NOT NULL AND FieldOne LIKE(@ArgumentForFieldOne))
        OR (@ArgumentForFieldOne IS NULL)
       )

You'd set @ArgumentForFieldOne to NULL if you don't want to search that particular field. This has the disadvantage that you can't pass NULL as a parameter to search for though. You can bypass this problem by introducing a separate bit that indicates whether you want to filter the field or not;
DECLARE @TEST AS TABLE
	(FieldOne VARCHAR(10))
INSERT INTO @TEST VALUES('Hello')
INSERT INTO @TEST VALUES('World')

DECLARE @DoFilterFieldOne AS BIT
    SET @DoFilterFieldOne = 1
DECLARE @ArgumentForFieldOne AS VARCHAR(10)
    SET @ArgumentForFieldOne = 'He%'

SELECT *
  FROM @TEST
 WHERE (
           (@DoFilterFieldOne = 1 AND FieldOne LIKE(@ArgumentForFieldOne))
        OR (@DoFilterFieldOne = 0)
       )

You can wrap these constructions in a table-valued function, but a sproc where you pass @DoFilterFieldOne and @ArgumentForFieldOne is also an option.

SQL lingua venusta Smile | :)

QuestionA problem occurs while connecting(using Socket Class) Pin
CoderForEver19-Aug-09 0:34
CoderForEver19-Aug-09 0:34 
AnswerRe: A problem occurs while connecting(using Socket Class) Pin
stancrm19-Aug-09 0:55
stancrm19-Aug-09 0:55 
GeneralRe: A problem occurs while connecting(using Socket Class) Pin
CoderForEver19-Aug-09 1:06
CoderForEver19-Aug-09 1:06 
AnswerRe: A problem occurs while connecting(using Socket Class) Pin
stancrm19-Aug-09 1:01
stancrm19-Aug-09 1:01 
GeneralRe: A problem occurs while connecting(using Socket Class) Pin
CoderForEver19-Aug-09 1:08
CoderForEver19-Aug-09 1:08 
GeneralRe: A problem occurs while connecting(using Socket Class) Pin
stancrm19-Aug-09 1:14
stancrm19-Aug-09 1:14 
GeneralRe: A problem occurs while connecting(using Socket Class) Pin
CoderForEver19-Aug-09 1:19
CoderForEver19-Aug-09 1:19 
GeneralRe: A problem occurs while connecting(using Socket Class) Pin
stancrm19-Aug-09 1:27
stancrm19-Aug-09 1:27 
GeneralRe: A problem occurs while connecting(using Socket Class) Pin
CoderForEver19-Aug-09 1:34
CoderForEver19-Aug-09 1:34 
AnswerRe: A problem occurs while connecting(using Socket Class) Pin
stancrm19-Aug-09 1:13
stancrm19-Aug-09 1:13 
GeneralRe: A problem occurs while connecting(using Socket Class) Pin
CoderForEver19-Aug-09 1:17
CoderForEver19-Aug-09 1:17 
GeneralRe: A problem occurs while connecting(using Socket Class) Pin
stancrm19-Aug-09 1:28
stancrm19-Aug-09 1:28 
AnswerRe: A problem occurs while connecting(using Socket Class) Pin
stancrm19-Aug-09 1:34
stancrm19-Aug-09 1:34 
GeneralRe: A problem occurs while connecting(using Socket Class) Pin
CoderForEver19-Aug-09 1:37
CoderForEver19-Aug-09 1:37 
GeneralRe: A problem occurs while connecting(using Socket Class) Pin
CoderForEver19-Aug-09 1:40
CoderForEver19-Aug-09 1:40 
GeneralRe: A problem occurs while connecting(using Socket Class) Pin
stancrm19-Aug-09 1:44
stancrm19-Aug-09 1:44 
GeneralRe: A problem occurs while connecting(using Socket Class) Pin
CoderForEver19-Aug-09 1:50
CoderForEver19-Aug-09 1:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.