changing a table name in dataset
-
Hi , Is there a way to change the table name of a datatable in a dataset or create a new dataset and copy the table with a new name in to the new dataset?
Jack Sparrow -------------------------------------- Defeat is not the worst of failures. Not to have tried is the true failure.
-
Hi , Is there a way to change the table name of a datatable in a dataset or create a new dataset and copy the table with a new name in to the new dataset?
Jack Sparrow -------------------------------------- Defeat is not the worst of failures. Not to have tried is the true failure.
Use below code and next time try to use Google
dataset.Tables[0].TableName = "MyTable1";
dataset.Tables[1].TableName = "MyTable2";or do it in loop
for (int i = 0; i <= dataset.Tables.Count; i++)
{dataset.Tables[i].TableName = "MyTable" + i.ToString();
}Cheers,
SMPRecent Tip/Tricks
Prevent a drag and drop text and Copy paste text in your textbox control
Find a column name within SQL database -
Use below code and next time try to use Google
dataset.Tables[0].TableName = "MyTable1";
dataset.Tables[1].TableName = "MyTable2";or do it in loop
for (int i = 0; i <= dataset.Tables.Count; i++)
{dataset.Tables[i].TableName = "MyTable" + i.ToString();
}Cheers,
SMPRecent Tip/Tricks
Prevent a drag and drop text and Copy paste text in your textbox control
Find a column name within SQL databaseThanks mate, really not sure how I missed this...
Jack Sparrow -------------------------------------- Defeat is not the worst of failures. Not to have tried is the true failure.
-
Thanks mate, really not sure how I missed this...
Jack Sparrow -------------------------------------- Defeat is not the worst of failures. Not to have tried is the true failure.
you are welcome :)
Cheers,
SMPRecent Tip/Tricks
Prevent a drag and drop text and Copy paste text in your textbox control
Find a column name within SQL database