Home All Groups Group Topic Archive Search About

stored procedure select statement with where clause

Author
5 May 2006 4:07 AM
ss
Hi,

Can anybody give me a sample code / sql script showing correc syntax
like SELECT * FROM TABLE WHERE FIELD =

the value to the where clause , i should be able to pass from the front end

it should return a result

how do i take this result? in a datareader? or in dataset?

thanks,
ss

Author
5 May 2006 4:52 AM
Cor Ligthert [MVP]
ss,

This depends if it is OleDB or SQLClient or whatever.

SQLClient uses named parameters, OleDB does not here is the sequentce in
what the parmameters are given important.

See here a sample on our website

http://www.vb-tips.com/default.aspx?ID=550279ec-6767-44ff-aaa3-eb8b44af0137

If you want to bring the text Selelect to a stored procedure select than you
have to set in front the declaration of the used parameters.

ALTER Procedure [dbo].[sp_UseDateSample] @OrderDate TimeDate AS

I hope this helps,

Cor







Show quote
"ss" <s*@discussions.microsoft.com> schreef in bericht
news:1A9A02EA-2E98-40D9-8438-D25E3192A105@microsoft.com...
> Hi,
>
> Can anybody give me a sample code / sql script showing correc syntax
> like SELECT * FROM TABLE WHERE FIELD =
>
> the value to the where clause , i should be able to pass from the front
> end
>
> it should return a result
>
> how do i take this result? in a datareader? or in dataset?
>
> thanks,
> ss
Author
5 May 2006 3:47 PM
Jeff Dillon
Get a book

Show quote
"ss" <s*@discussions.microsoft.com> wrote in message
news:1A9A02EA-2E98-40D9-8438-D25E3192A105@microsoft.com...
> Hi,
>
> Can anybody give me a sample code / sql script showing correc syntax
> like SELECT * FROM TABLE WHERE FIELD =
>
> the value to the where clause , i should be able to pass from the front
> end
>
> it should return a result
>
> how do i take this result? in a datareader? or in dataset?
>
> thanks,
> ss
Author
9 May 2006 5:06 AM
ss
hi,

where in medical shop?

Show quote
"Jeff Dillon" wrote:

> Get a book
>
> "ss" <s*@discussions.microsoft.com> wrote in message
> news:1A9A02EA-2E98-40D9-8438-D25E3192A105@microsoft.com...
> > Hi,
> >
> > Can anybody give me a sample code / sql script showing correc syntax
> > like SELECT * FROM TABLE WHERE FIELD =
> >
> > the value to the where clause , i should be able to pass from the front
> > end
> >
> > it should return a result
> >
> > how do i take this result? in a datareader? or in dataset?
> >
> > thanks,
> > ss
>
>
>
Author
9 May 2006 4:25 PM
Jeff Dillon
I meant, get a book on ASP.NET. Any book will describe what you are looking
for

amazon.com

Jeff

Show quote
"ss" <s*@discussions.microsoft.com> wrote in message
news:CFE19711-ED52-4A2D-934A-B64F1893A921@microsoft.com...
> hi,
>
> where in medical shop?
>
> "Jeff Dillon" wrote:
>
>> Get a book
>>
>> "ss" <s*@discussions.microsoft.com> wrote in message
>> news:1A9A02EA-2E98-40D9-8438-D25E3192A105@microsoft.com...
>> > Hi,
>> >
>> > Can anybody give me a sample code / sql script showing correc syntax
>> > like SELECT * FROM TABLE WHERE FIELD =
>> >
>> > the value to the where clause , i should be able to pass from the front
>> > end
>> >
>> > it should return a result
>> >
>> > how do i take this result? in a datareader? or in dataset?
>> >
>> > thanks,
>> > ss
>>
>>
>>

AddThis Social Bookmark Button