Dataset VS2005 and SQLServer2005

  • Thread starter Thread starter active T
  • Start date Start date
A

active T

Hi,

I've build a application, and this is the first time that i try to use
the dataset (designer) from VS. It seems to be very intressing
building a dataaccesslayer into my application. I use stored
procedures for the actions on the databases. This working fine. But
now i want to use the return value of the SP.

Ik can do actions on the database and can say RETURN 0 of RETURN
@@Error.

The problem is how can i read the return value from my dataset, or do
i need to build the DAL by myself (as i always did before)

thnx
 
active said:
Hi,

I've build a application, and this is the first time that i try to use
the dataset (designer) from VS. It seems to be very intressing
building a dataaccesslayer into my application. I use stored
procedures for the actions on the databases. This working fine. But
now i want to use the return value of the SP.

Ik can do actions on the database and can say RETURN 0 of RETURN
@@Error.

The problem is how can i read the return value from my dataset, or do
i need to build the DAL by myself (as i always did before)

thnx

If I've understood you correctly...

In your DataSet designer, right click on the table adapter and select to
add a new query. Follow the wizard, making sure that you select the
option to return a single value (the choice is between returning a
table, a single value, or nothing).

You may need to wrap your return in a select in your SP.

HTH


Peter
 
That's possible to do.

Only if you want to do:

Select colA,colB from TableZ
And there's an errorcode 516 (a random error number)

I want to return a error 516

If there no errors, i want to return the results inclusive the return
value 0.

This is handy by inserting data. You can receive the new values and
errormessages.
 

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

Back
Top