G
Guest
I'm building a dataset that writes out a Point type value.
Here's the code that I've got:
1 Dim dsContent As DataSet = New DataSet("content")
2 Dim dtAsset As DataTable = New DataTable("asset")
3 Dim dcPk(0) As DataColumn
4 dcPk(0) = _
5 dtAsset.Columns.Add("fullName", Type.GetType("System.String"))
6 dtAsset.Columns.Add("videoLocation",
Type.GetType("System.Drawing.Point"))
7 dtAsset.Columns.Add("videoSize", Type.GetType("System.Drawing.Size"))
8 dtAsset.PrimaryKey = dcPk 'define primary key for this table
9 dsContent.Tables.Add(dtAsset)
The code compiles just fine but always blows up on line #6 stating:
An unhandled exception of type 'System.ArgumentNullException'
occurred in system.data.dll
Additional information: 'dataType' argument cannot be null.
How any idea what the problem is here and how to correct it?
Here's the code that I've got:
1 Dim dsContent As DataSet = New DataSet("content")
2 Dim dtAsset As DataTable = New DataTable("asset")
3 Dim dcPk(0) As DataColumn
4 dcPk(0) = _
5 dtAsset.Columns.Add("fullName", Type.GetType("System.String"))
6 dtAsset.Columns.Add("videoLocation",
Type.GetType("System.Drawing.Point"))
7 dtAsset.Columns.Add("videoSize", Type.GetType("System.Drawing.Size"))
8 dtAsset.PrimaryKey = dcPk 'define primary key for this table
9 dsContent.Tables.Add(dtAsset)
The code compiles just fine but always blows up on line #6 stating:
An unhandled exception of type 'System.ArgumentNullException'
occurred in system.data.dll
Additional information: 'dataType' argument cannot be null.
How any idea what the problem is here and how to correct it?