J
Jim Heavey
Hello, I have done a little VB Programming and now I am giving C# a try.
Right now I am working with Dataset and DataTables and there are a couple
of compile errors that I would work in VB, but are apparently different in
C#.
If I want a table from a DataSet, in VB.Net I would enter the command as
follows:
Dim Table as DataTable = ds.Tables("MyTable")
I tried this in C#
DataTable tbl = ds.Tables("Events");
To get an item from a dataReader into a DataROW Field I would use a command
which looks like the following:
Row.Items("MyField") = dr.items("Field1")
IN C# I tried...
row(0) = dr.GetInt16(0);
When I create a column in a DataTable in VB.Net, I would enterer
Tbl.Columns.Add("MyField", getType(System.String))
In C# I tried
tbl2.Columns.Add("ClubID", GetType(System.Int16));
What am I doing wrong?
Right now I am working with Dataset and DataTables and there are a couple
of compile errors that I would work in VB, but are apparently different in
C#.
If I want a table from a DataSet, in VB.Net I would enter the command as
follows:
Dim Table as DataTable = ds.Tables("MyTable")
I tried this in C#
DataTable tbl = ds.Tables("Events");
To get an item from a dataReader into a DataROW Field I would use a command
which looks like the following:
Row.Items("MyField") = dr.items("Field1")
IN C# I tried...
row(0) = dr.GetInt16(0);
When I create a column in a DataTable in VB.Net, I would enterer
Tbl.Columns.Add("MyField", getType(System.String))
In C# I tried
tbl2.Columns.Add("ClubID", GetType(System.Int16));
What am I doing wrong?