fkheng Posted June 1, 2003 Posted June 1, 2003 If i fill a data set with data from an existing data source through a data adapter, with a table from a databsae, the table will be automatically created in the data set rite? so do i still need to declare a data table instance to represent this table from my database? Quote Can you bind the beautiful Pleiades, and can you loose the cords of Orion? - God to Job...
Madz Posted June 1, 2003 Posted June 1, 2003 NO you dont need to do that once you fill your dataset with some dataadapter it will automaticaly creates tables with in dataset and theri names are as like (table1), (table2) etc. and if you want to show result in datagrid just Datagrid.datasource = dataset.table("tabale1") Quote The one and only Dr. Madz eee-m@il
fkheng Posted June 1, 2003 Author Posted June 1, 2003 oh, u mean when the tables are automatically created, they are assigned with default names like table1 or table2, not the original table name as in the real database? adapter.Fill(ds, "LoginTable") when i use this command to fill a dataset, the second argument here has to be a data table object...wat do i write in here when i am filling from an existing data source and have no data table ob ject created? Quote Can you bind the beautiful Pleiades, and can you loose the cords of Orion? - God to Job...
Madz Posted June 1, 2003 Posted June 1, 2003 If you specify the table name then it will create the table with that name and fill data in it returned from query. as here adapter.Fill(ds, "LoginTable") it will create a logintable. if you dont specify any table adapter.Fill(ds) it must create a table just it will give it name Table1, its much better to always use a table Name. Quote The one and only Dr. Madz eee-m@il
fkheng Posted June 2, 2003 Author Posted June 2, 2003 i see, thanx a lot oman! Quote Can you bind the beautiful Pleiades, and can you loose the cords of Orion? - God to Job...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.