Hi there,
When you use DataAdapter to fill a DataSet, unless you give specified table
name, it assigns default table name, ‘Table’. For example, in following code
SqlDataAdapter dap = new SqlDataAdapter(“Select * From table_one; Select *
From table_two”, CONNECTION_STRING);
DataSet ds = new DataSet();
Dap.Fill(ds);
Two tables are in ds, their table names are ‘Table’ and ‘Table1’ respectively.
Or
dap.Fill(ds, “Table_One”);
You have table name ‘Table_One’ for the first table and ‘Table_One1’ for
second table.
HTH
Elton Wang
(E-Mail Removed)
"roni" wrote:
> hi.
>
> i created a command that get 2 tables from db.
>
> when try to access the tables in the dataset , i can't access the tables by
> their names(by their original name from db ),only by index.
>
> is there a way to access them by name ? (meaning the dataset will automatic
> will set the real name of the db table ).
>
>
>