cmd=new sqlcommand("insert_student",con)
cmd.commandtype=commandType.StoredProcedure
Add.Parameters.AddwithValue("@stuid",txtstuid.text)
Add.Parameters.AddwithValue("@name",txtname.text)
Add.Parameters.AddwithValue("@course",txtcourse.text)
con.open()
cmd.ExecuteNonQuery()
i want to create method for executing procedure but how it possible...
Function ExecuteStoredProc(Proc as String)
cmd=new sqlcommand(Proc,con)
cmd.commandtype=commandType.StoredProcedure
Add.Parameters.AddwithValue(????,?????)
con.open()
cmd.ExecuteNonQuery()
end function
how to call this function can anybody help me.........