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)
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)