Mr_Shaw
asked on
Create a table and add a row.... is there anything wrong with the code?
DataTable dtbl = ds.Tables[0];
DataTable schemaDataTable = new DataTable();
DataColumn schemaDataColumn;
schemaDataColumn = new DataColumn();
schemaDataColumn.DataType = Type.GetType("System.Strin g");
schemaDataColumn.ColumnNam e = "ColumnName";
schemaDataTable.Columns.Ad d(schemaDa taColumn);
DataRow row = schemaDataTable.NewRow();
row["ColumName"] = "Name";
schemaDataTable.Rows.Add(r ow);
DataTable schemaDataTable = new DataTable();
DataColumn schemaDataColumn;
schemaDataColumn = new DataColumn();
schemaDataColumn.DataType = Type.GetType("System.Strin
schemaDataColumn.ColumnNam
schemaDataTable.Columns.Ad
DataRow row = schemaDataTable.NewRow();
row["ColumName"] = "Name";
schemaDataTable.Rows.Add(r
Looks ok to me. Are you having a problem with it?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
@ tgerbert: Good looking.
Looked at it for 5 min and didn't see that.
Looked at it for 5 min and didn't see that.
I copied & pasted it into a console project, Visual Studio found it for me. ;)
ASKER
thanks