Click here to Skip to main content
15,914,416 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionPDF Embed Pin
hamid reza mansouri18-Apr-09 3:31
professionalhamid reza mansouri18-Apr-09 3:31 
AnswerRe: PDF Embed Pin
N a v a n e e t h18-Apr-09 16:53
N a v a n e e t h18-Apr-09 16:53 
QuestionHow to display company icon in address bar Pin
Jagz W18-Apr-09 2:44
professionalJagz W18-Apr-09 2:44 
AnswerRe: How to display company icon in address bar Pin
AprNgp18-Apr-09 3:26
AprNgp18-Apr-09 3:26 
Questiontext from DataGrid Pin
Learner52018-Apr-09 2:21
Learner52018-Apr-09 2:21 
AnswerRe: text from DataGrid Pin
N a v a n e e t h18-Apr-09 16:56
N a v a n e e t h18-Apr-09 16:56 
QuestionTextbox color change when required field or custom field validator fires Pin
MallikarjunaGupta18-Apr-09 2:00
MallikarjunaGupta18-Apr-09 2:00 
QuestionHow to use if condition in stored procedures Pin
Nekkantidivya18-Apr-09 0:25
Nekkantidivya18-Apr-09 0:25 
Hi,

I want to develop a stored procedure in which I have to apply different modifications to the Query. Finally after undergoing all the changes to the query I have to execute the final query and get the resultant table.For example:

Create Procedure [dbo].[Test]
@Flg1 bit,
@Flg2 bit,
@Flg3 bit,

AS
BEGIN
SET NOCOUNT ON;

Declare @Query varchar(max)

if(@Flg1<>0)
Begin
Set @Query='Select * from emplayee where empId=1"
End

if(@Flg2<>0)
Begin
Set @Query=@Query+'and empId=2'
End

if(@Flg3<>0)
Begin
Set @Query=@Query+'and empId=3'
End

Exec sp_executesql(@Query);

End

As shown above my Query conditions will change according to the parameters. But here I am not able to get the resultant table. Please reply me if anyone know how to get the resultant Table. Also please tell me whether the above procedure is correct or not.

Thanks in advance.
AnswerRe: How to use if condition in stored procedures [modified] Pin
Dev S18-Apr-09 1:16
Dev S18-Apr-09 1:16 
AnswerRe: How to use if condition in stored procedures Pin
Herman<T>.Instance20-Apr-09 3:13
Herman<T>.Instance20-Apr-09 3:13 
Questionprint page problem Pin
lakshmichawala17-Apr-09 23:32
lakshmichawala17-Apr-09 23:32 
QuestionFailed to access IIS metabase. Pin
Kiran 267104817-Apr-09 21:49
Kiran 267104817-Apr-09 21:49 
AnswerRe: Failed to access IIS metabase. Pin
N a v a n e e t h17-Apr-09 21:53
N a v a n e e t h17-Apr-09 21:53 
GeneralRe: Failed to access IIS metabase. Pin
Kiran 267104818-Apr-09 0:34
Kiran 267104818-Apr-09 0:34 
Questionhow to get the activeobject of a running instance of MS WORD in ASP.NET? [modified] Pin
Michael Tang17-Apr-09 21:36
Michael Tang17-Apr-09 21:36 
AnswerRe: how to get a activeobject of a running instance of MS WORD in ASP.NET? Pin
N a v a n e e t h17-Apr-09 21:46
N a v a n e e t h17-Apr-09 21:46 
GeneralRe: how to get a activeobject of a running instance of MS WORD in ASP.NET? Pin
Michael Tang17-Apr-09 23:17
Michael Tang17-Apr-09 23:17 
GeneralRe: how to get a activeobject of a running instance of MS WORD in ASP.NET? Pin
Michael Tang17-Apr-09 23:21
Michael Tang17-Apr-09 23:21 
GeneralRe: how to get a activeobject of a running instance of MS WORD in ASP.NET? Pin
N a v a n e e t h18-Apr-09 6:36
N a v a n e e t h18-Apr-09 6:36 
GeneralRe: how to get a activeobject of a running instance of MS WORD in ASP.NET? Pin
Michael Tang19-Apr-09 21:14
Michael Tang19-Apr-09 21:14 
QuestionTreeview child menu control is not responding when the session timed out Pin
Kiran 267104817-Apr-09 20:56
Kiran 267104817-Apr-09 20:56 
AnswerRe: Treeview child menu control is not responding when the session timed out Pin
N a v a n e e t h17-Apr-09 21:00
N a v a n e e t h17-Apr-09 21:00 
GeneralRe: Treeview child menu control is not responding when the session timed out Pin
Kiran 267104817-Apr-09 21:43
Kiran 267104817-Apr-09 21:43 
GeneralRe: Treeview child menu control is not responding when the session timed out Pin
N a v a n e e t h17-Apr-09 21:50
N a v a n e e t h17-Apr-09 21:50 
GeneralRe: Treeview child menu control is not responding when the session timed out Pin
Kiran 267104817-Apr-09 23:23
Kiran 267104817-Apr-09 23:23 

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.