hi
this is my coding when i run this coding for display the content in textboxes from the database by click event in datagrid.
"Procedure or Function 'sp_developer_display' expects parameter '@developerid', which was not supplied."
this error will display
my sp in sql express is

ALTER PROCEDURE dbo.sp_developer_display
(
@developerid int
)

AS
/* SET NOCOUNT ON */
select developercode,developername,qualification,dateofjoin,designation,experience,knownsoft from tst_m_developermaste where id=@developerid and tstflag='N'
RETURN

vb.net codin

Dim mydst As New DataSet
MyConnection.ConnectionString = connstring
Dim disp As New SqlDataAdapter("sp_developer_display", MyConnection)
disp.Fill(mydst, "dev_display")

txtdevelopercode.Text = mydst.Tables("dev_display").Rows(0).Item("developercode")
txtdevelopername.Text = mydst.Tables("dev_display").Rows(0).Item("developername")
txtqualification.Text = mydst.Tables("dev_display").Rows(0).Item("qualification")
dtpdateofjoin.Value = mydst.Tables("dev_display").Rows(0).Item("dateofjoin")
txtdesignation.Text = mydst.Tables("dev_display").Rows(0).Item("designation")
txtexperience.Text = mydst.Tables("dev_display").Rows(0).Item("experience")
txtknownsoftware.Text = mydst.Tables("dev_display").Rows(0).Item("knownsoft")
mydst.Dispose()

i need help how to pass parameter to stored procedure for check the id which we get from the datagrid click for display the datas which we get from the database.

Re: pass parameter to stored procedure through vb.net 80 80
...

Dim mydst As New DataSet
MyConnection.ConnectionString = connstring
Dim disp As New SqlDataAdapter("sp_developer_display", MyConnection)

disp.SelectCommand.Parameters.AddWithValue("@developerid",10)

disp.Fill(mydst, "dev_display")

...
Re: pass parameter to stored procedure through vb.net 80 80

i change the coding but not works

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.