I urgently need help on how to execute a stored procedure in SQL Express 2005. I have created a stored procedure with as follows:
Create Procedure upInsertCountry
@CountryName varchar(50)
INSERT INTO CountryTable (CountryName) VALUES (@CountryName)
When run the following code :
myCom.CommandType.StoredProcedure
myCom.CommandText = "upInsertCountry @CountryName = 'South Africa' "
I get the error message 'Incorrect Syntax near 'upInsertCountry'
But when i copy the above statement and run it in the Management Studio, it works.
I am using SQL Express 2005
Any idea what the problem is?