return value question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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?
 
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.
 
Back
Top