stored procedure select statement with where clause

G

Guest

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
 
C

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
 
J

Jeff Dillon

I meant, get a book on ASP.NET. Any book will describe what you are looking
for

amazon.com

Jeff
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top