N
news.microsoft.com
I have a SQL Server database. I am using a OleDB Provider. I am getting
the following error
An unhandled exception of type 'System.InvalidOperationException' occurred
in System.Data.dll
Additional information: Command parameter[2] '' is invalid.
Command parameter[3] '' is invalid.
Here is the code
_sql = "INSERT INTO QueryBuilderTableViews([ObjectName],[ObjectType]) VALUES
" +
" (?, ?)";
cmd.CommandText = _sql;
OleDbParameter _objectName = new OleDbParameter("@ObjectName",
OleDbType.Char, 50);
OleDbParameter _objectType = new OleDbParameter("@ObjectType",
OleDbType.Char, 1);
_objectName.Value = _name;
_objectType.Value = _type;
cmd.Parameters.Add(_objectName);
cmd.Parameters.Add(_objectType);
cmd.ExecuteNonQuery(); ////ERROR LINE
Thanks
Bill
the following error
An unhandled exception of type 'System.InvalidOperationException' occurred
in System.Data.dll
Additional information: Command parameter[2] '' is invalid.
Command parameter[3] '' is invalid.
Here is the code
_sql = "INSERT INTO QueryBuilderTableViews([ObjectName],[ObjectType]) VALUES
" +
" (?, ?)";
cmd.CommandText = _sql;
OleDbParameter _objectName = new OleDbParameter("@ObjectName",
OleDbType.Char, 50);
OleDbParameter _objectType = new OleDbParameter("@ObjectType",
OleDbType.Char, 1);
_objectName.Value = _name;
_objectType.Value = _type;
cmd.Parameters.Add(_objectName);
cmd.Parameters.Add(_objectType);
cmd.ExecuteNonQuery(); ////ERROR LINE
Thanks
Bill