Visual Studio 2013 is not recognizing the SQLParameter object

308 Views Asked by At

I am having an issue with Visual Studio. I am unable to use SQLParameter in my code:

var returnParameter = new SQLParameter("@SqlStatement", SqlDbType.VarChar);
returnParameter.Direction = ParameterDirection.Output;
cmd.Parameters.Add(returnParameter);

Visual Studio Info:

Microsoft Visual Studio Ultimate 2013
Version 12.0.31101.00 Update 4
Microsoft .NET Framework
Version 4.5.51641

Also here is a screen shot:

Code Issue

I am using the namespace:

using System.Data.SqlClient;

Can some please tell me why VS doesn't recognize the SQLParameter and what I can do to discover the reason why?

1

There are 1 best solutions below

5
On BEST ANSWER

Class names are case sensitive. You should have

var returnParameter = new SqlParameter("@SqlStatement", SqlDbType.VarChar);

See: http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlparameter%28v=vs.110%29.aspx