Return Value From Stored Procedure

  • Thread starter Thread starter Lou Civitella
  • Start date Start date
L

Lou Civitella

I am using VB.NET and SQL Server 2000.

I Created a small stored procedure that returns a string value:

CREATE PROCEDURE sp_GetEmployee
@EmpNo int
AS
SELECT FirstName + ' ' + LastName As Name FROM tsqlEmployeeSetup WHERE EmpNo
= @EmpNo
GO

Using VB.NET I would like to be to have the user enter a EmpNo in a field on
a text box and then have the stored procedure lookup the value and return it
in a message box in VB.NET.

How do I do this?

Thanks,
Lou

Also I have another question:
Being an Access developer I am used to the After Update event of a field
what event can I use in VB .NET that would be considered the same?

Thanks Again.
 
This should help

http://msdn.microsoft.com/library/d...tml/cpconinputoutputparametersreturnvalues.as

----- Lou Civitella wrote: ----

I am using VB.NET and SQL Server 2000

I Created a small stored procedure that returns a string value

CREATE PROCEDURE sp_GetEmploye
@EmpNo in
A
SELECT FirstName + ' ' + LastName As Name FROM tsqlEmployeeSetup WHERE EmpN
= @EmpN
G

Using VB.NET I would like to be to have the user enter a EmpNo in a field o
a text box and then have the stored procedure lookup the value and return i
in a message box in VB.NET

How do I do this

Thanks
Lo

Also I have another question
Being an Access developer I am used to the After Update event of a fiel
what event can I use in VB .NET that would be considered the same

Thanks Again
 
Back
Top