Retriving data

S

simon

One simple examle:

I have SP returnArticle with parameter @artId:

CREATE PROCEDURE returnArticle
@artId as int
AS
select artText from Articles where artId=@artId

I was using connection object in asp like this:

sql="exec returnArticle 1"
articleText=conn.execute(sql).fields.item(0).Value

Very simple, I get text with one row of code

Is there something similar in asp.net

I don't like command object, there is to many rows of code, with parameters
add and similar
What is the best way here in aspNet?

I tried something with sqlDataAdapter but doesnt work if I have parameter in
procedure

Thank you for your answers,
Simon
 

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

Members online

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top