2010-02-03

System.Data.SqlClient.SqlException: Incorrect syntax near 'storedProcedureName'.

So, you were trying to use the SqlCommand and got this cryptic error when you tried to execute a stored procedure?

Try changing the CommandType property on the SqlCommand:

command.CommandType = System.Data.CommandType.StoredProcedure

The CommandType is by default Text.

No comments: