Data Form Wizard: value cannot be null, parameter name: type

  • Thread starter Thread starter Jayme Pechan
  • Start date Start date
J

Jayme Pechan

PROBLEM:

I saw previous posts on the issue where you try to use the Data Form Wizard
and you get the error:

Data Form Wizard: value cannot be null, parameter name: type

I also saw various solutions. None of which worked for me. I am using
Version 2003 of Visual Studio .NET.

SOLUTION:

You can't name your Dataset the same as your table name that will be in the
dataset or you will get this error. For example, I called my dataset
"Agent" and my database table name was also "Agent". This choked. When I
changed the dataset name to Agent01 and selected Agent table, it worked
correctly.

FYI.
 
Hi Jayme.

This is by design.
Because the IDE will generate a DataSet class for us to manipulate which
will have the datatable name as the property.
e.g.
public class DataSetName
{
public DataTable DataSetName
{
get;
set;
}
}


The code above will get a compiler error "'DataSetName': member names
cannot be the same as their enclosing type";

Hope this helps.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Back
Top