Go Back   Velocity Reviews > Newsgroups > ASP Net
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

ASP Net - return value question

 
Thread Tools Search this Thread
Old 01-23-2006, 09:17 AM   #1
Default return value question


Dear all,
question 1:
IF (NOT EXISTS(SELECT * FROM table)
RETURN 1
ELSE
RETURN 0

how to get back the return value from stored procedure from ado.net 2.0
i try Dim result As Boolean = command.ExecuteScalar
but can't get back


question 2:
what is the meaning - using.....

question 3:
why i create a stored procedure in sql server 2005, it need to save the file
into somewhere, how to store into the database?



=?Utf-8?B?a2Vu?=
  Reply With Quote
Old 01-23-2006, 11:56 AM   #2
Kevin Spencer
 
Posts: n/a
Default Re: return value question
> how to get back the return value from stored procedure from ado.net 2.0

To get the return value, add a parameter to the Command with
ParameterDirection.ReturnValue.

> what is the meaning - using.....


It depends on how you're "using" it. It can mean either the same thing as
VB.Net "Imports" - that is, it provides a namespace hierarchy for your code
so you don't have to retype it all the time:

using System.Web.UI.WebControls;

Or, it can be used with a statement block to ensure that a disposable class
instance is disposed:

using (FileStream fs = new FileStream(FileName, FileMode.Open,
FileAccess.Read))
{
....
}

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Who is Mighty Abbott?
A twin turret scalawag.

"ken" <> wrote in message
news:60EB80A6-16CC-4734-A620-...
> Dear all,
> question 1:
> IF (NOT EXISTS(SELECT * FROM table)
> RETURN 1
> ELSE
> RETURN 0
>
> how to get back the return value from stored procedure from ado.net 2.0
> i try Dim result As Boolean = command.ExecuteScalar
> but can't get back
>
>
> question 2:
> what is the meaning - using.....
>
> question 3:
> why i create a stored procedure in sql server 2005, it need to save the
> file
> into somewhere, how to store into the database?
>





Kevin Spencer
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Good morning or good evening depending upon your location. I want to ask you the most important question of your life. Your joy or sorrow for all eternity depends upon your answer. The question is: Are you saved? It is not a question of how good God DVD Video 3 04-25-2005 04:19 PM
Re: Good morning or good evening depending upon your location. I want to ask you the most important question of your life. Your joy or sorrow for all eternity depends upon your answer. The question is: Are you saved? It is not a question of how good Filthy Mcnasty DVD Video 0 04-25-2005 04:29 AM
Netflix Heavy-User / Etiquette question Squareness Wafer DVD Video 3 05-22-2004 03:32 AM
Netflix Heavy-User / Etiquette question Squareness Wafer DVD Video 3 05-13-2004 08:20 PM
Styx - Return to Paradise audio question Johnnyboy DVD Video 2 04-13-2004 09:34 PM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46