Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Stored Procedure Calling

Status
Not open for further replies.

checkai

Programmer
Jan 17, 2003
1,629
US
Here is my SP....I want to send a Client ID and retrieve multiple contacts back...then populate a drop down list with Text of cName and Value of ContactID....

CREATE Proc WorkFlow_SPClientContacts @cID varchar
AS

declare @c as int
set @c = convert(int,@cID)

select case when c.firstname = '' or c.firstname is null then c.secondname else c.secondname+', '+c.firstname end as cName,
c.contactID
from tblcontacts c
inner join tblCliContactOwnership cc on c.contactID = cc.contactID
where cc.clientID = @c
GO

------------------
CURRENT CODE START...NOT SURE IF ITS CORRECT
------------------
'Contacts
Dim cmd As SqlCommand
Dim contactID As Integer
Dim contactName As String

cmd = New SqlCommand("WorkFlow_SPClientContacts", objConn)
cmd.CommandType = CommandType.StoredProcedure
cmd.Parameters.Add("@cID", cID)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top