How do I get the return value of a scalar and display it?

J

jm

Hi, I have a simple page:

One ObjectDataSource
One TableAdapter
One Gridview
a button and a textbox to hold my between dates parameters

I have simple SQL, select count(*) as total from employees where
startdate between @start and @end



In my tableadapter I have the sql and when I preview it it works
fine. When I drop the objectdatasource on the webpage and configure
it it does not give me the option for the select tab to get that
method that would return the scalar value (my count).

How do I get that count and put it in a gridview? Please.

Thank you for any help.
 
J

jm

how about something like:
label1.text=YourObject.ExecuteScalar

David Wierhttp://aspnet101.comhttp://iWritePro.com- One click PDF, convert .doc/.rtf/.txt to HTML with no
bloated markup











- Show quoted text -

I can't use the drag and drop and properties like with a regular
select, insert, and update statement?
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top