Error adding parameters to SQL Server stored procedure though VB code?

parameters, sql-server, stored-procedures, vb.net

Solution

I would go out on a limb (because I don't see it in the above code) and say it's because you didn't set the `cmd2.CommandType` to `StoredProcedure`. By default, the command type is `Text`, which is used for inline SQL.

Problem

I am struggling to pass though parameter to a stored procedure I have written. I’m really not sure what I am doing wrong here, but I’m struggling to get VB to pass parameters to SQL Server. I am setting the `@m_id` above??

Original source