C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,648 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi Friends,
Unable to figure out the error in this line
The Best Overload Match has some invalid arguements
lParamerterList1.Add(new DataType("@I_USERNO", SqlDbType.Int,44, ParameterDirection.Input));
This is the contructer class code for the same
namespace Core.HelperClasses.Generic
{
[Serializable()]
public class DataType
{
private string _ParameterName;
private DbType _DbType;
private object _Value;
private ParameterDirection _Direction;
public string ParameterName
{
get { return _ParameterName; }
set { _ParameterName = value; }
}
public DbType dbType
{
get { return _DbType; }
set { _DbType = value; }
}
public object Value
{
get { return _Value; }
set { _Value = value; }
}
public ParameterDirection Direction
{
get { return _Direction; }
set { _Direction = value; }
}
public DataType()
{
}
public DataType(string ParameterName, DbType dbType, object Value, ParameterDirection Direction)
{
this.ParameterName = ParameterName;
this.dbType = dbType;
this.Value = Value;
this.Direction = Direction;
}
}
}
Help would be appreciated
Thank You
Park
If you try passing in DbType.Int32
instead of SqlDbType.Int
does that fix it? (or whichever precision integer you have in your database)