Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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?

Can you bind the beautiful Pleiades, and can you loose the cords of Orion? - God to Job...
Posted

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")

The one and only

Dr. Madz

eee-m@il

Posted

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?

Can you bind the beautiful Pleiades, and can you loose the cords of Orion? - God to Job...
Posted

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.

The one and only

Dr. Madz

eee-m@il

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...