L
Lina
Hi,
I am trying to create my own dataset and assign it to a
datagrid. However i keep encountering the following
error...
An unhandled exception of
type 'System.NullReferenceException' occurred in
microsoft.visualbasic.dll
Additional information: Object variable or With block
variable not set.
here is my code i am using in the form_load event....
Dim DTable1
DTable1.Columns.Add("Room Date",
Type.GetType("system.datetime"))
DTable1.Columns.Add("Room Name",
Type.GetType("system.varchar"))
DTable1.Columns.Add("Layout",
Type.GetType("system.varchar"))
DTable1.Columns.Add("Session",
Type.GetType("system.varchar"))
DTable1.Columns.Add("Guests",
Type.GetType("system.int32"))
DTable1.Columns.Add("Meal Type",
Type.GetType("system.varchar"))
DTable1.Columns.Add("Quantity",
Type.GetType("system.Int32"))
DataGrid1.DataSource = DTable1
Does anyone know what i am doing wrong??
The application seems to stop in the following line...
DTable1.Columns.Add("Room Date", Type.GetType
("system.datetime"))
thx in advance
I am trying to create my own dataset and assign it to a
datagrid. However i keep encountering the following
error...
An unhandled exception of
type 'System.NullReferenceException' occurred in
microsoft.visualbasic.dll
Additional information: Object variable or With block
variable not set.
here is my code i am using in the form_load event....
Dim DTable1
DTable1.Columns.Add("Room Date",
Type.GetType("system.datetime"))
DTable1.Columns.Add("Room Name",
Type.GetType("system.varchar"))
DTable1.Columns.Add("Layout",
Type.GetType("system.varchar"))
DTable1.Columns.Add("Session",
Type.GetType("system.varchar"))
DTable1.Columns.Add("Guests",
Type.GetType("system.int32"))
DTable1.Columns.Add("Meal Type",
Type.GetType("system.varchar"))
DTable1.Columns.Add("Quantity",
Type.GetType("system.Int32"))
DataGrid1.DataSource = DTable1
Does anyone know what i am doing wrong??
The application seems to stop in the following line...
DTable1.Columns.Add("Room Date", Type.GetType
("system.datetime"))
thx in advance