Mary Bergeron

Mary Bergeron

  • NA
  • 10
  • 7.4k

Stored Procedure Calls Information to Visual Studio 2010 Windows Form

Nov 7 2011 4:58 PM
I'm trying to create a Windows form in Visual Studio 2010 that will call information from a stored procedure and display it on the windows form.  I created a view that is being used for the stored procedure that provides all of the needed information.

Basically, I want to look up a person by part or all of a name and then have it display on my Visual Studio Form:

CREATE PROCEDURE
dbo.Talisma_Search
(@Talisma_Search NVARCHAR(255))
AS
SELECT
[dbo].[tblTalisma_Lookup].[tName]
, [dbo].[tblTalisma_Lookup].[tSSN]
, [dbo].[tblTalisma_Lookup].[tEmail]
FROM
[dbo].[tblTalisma_Lookup]
WHERE
[dbo].[tblTalisma_Lookup].[tName] LIKE  '%'+@Talisma_Search + '%'
OR [dbo].[tblTalisma_Lookup].[tSSN] LIKE  '%'+@Talisma_Search + '%'
OR [dbo].[tblTalisma_Lookup].[tEmail] LIKE  '%'+@Talisma_Search + '%'
ORDER BY
[dbo].[tblTalisma_Lookup].[tName]


EXEC dbo.talisma_Search @talisma_Search ='savage'


What I want is a button on a Windows form that allows me to type in a name or SSN or email and then displays the result at the bottom of the form.  I have been researching this and have been unable to find any information on this type of project.

This is my first attempt at creating an application using Visual Studio.  I am very much a beginner so any help would be appreciated.

Thank you,

Mary





Answers (7)