Using SQL Server 2005 and VB.Net
Table1
ID Name Dept
001 Raja IT
002 Ravi CSE
003 Suns IT
Stored Procedure
Create Procedure Selecttable1 As Select ID, Name, Dept from table1
I want to execute the stored procedure with condition like
cmd = new sqlcommand("Exec SelectTable1 where id like '" & idsearch.Text & "%' ", dbcon)
cmd.ExecuteNonQuery
idsearch.Text - Textbox Input value
When I try to run the above query it was showing error.
How to execute a stored procedure with conditions?
Need Query Help