Problem calling scalar query in VS.NET 2005

D

dtalas

Hi all

I'm having a problem where calling scalar stored procedures always
returns NULL.

I have the simple test stored procedure, that returns a single integer:


ALTER PROCEDURE dbo.Test
AS
RETURN 27


I then create a new DataSet:

* using VS.NET 2005, I use the wizard to create a new Query Table
Adapter
* I specify my Test stored procedure as the one to call
* I specify that this is a "single value" call, i.e. create a function
to return a single value
* I call the new function "Test"

In my test program I call it:

QueriesTableAdapter qta = new QueriesTableAdapter();
object obj = qta.Test();

HOWEVER, the return from Test is always null. Anyone else is having
this problem with VS2005?

Thanks in advance,
Daniel.
 

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