DB table name n DS

  • Thread starter Thread starter al
  • Start date Start date
A

al

Hi,

When I retrieve a table from database to Dataset, Is there anyway to
know what is the table name,its name originaly in the database,
through any DataSet property, or form Bindingcontext ones?

MTIA,
Grawsha
 
Hi al,

If you let adapter create the table in dataset, the table will be named like
first table in from part of sql statament in select.
 
Hi,
Here is the code Example.

oAdapter = new SqlDataAdapter(Sql,oConn);
oAdapter.Fill(oDs,"Employee");
DataTable Dt;
Dt = oDs.Tables[0];
Response.write(Dt.TableName);

thanks
srinivas moorthy
 
srinivas moorthy said:
Hi,
Here is the code Example.

oAdapter = new SqlDataAdapter(Sql,oConn);
oAdapter.Fill(oDs,"Employee");
DataTable Dt;
Dt = oDs.Tables[0];
Response.write(Dt.TableName);

thanks
srinivas moorthy
-----Original Message-----
Hi,

When I retrieve a table from database to Dataset, Is there anyway to
know what is the table name,its name originaly in the database,
through any DataSet property, or form Bindingcontext ones?

MTIA,
Grawsha
.

Srinivas, what namespace is Response object in?? Can I get db
size(number of records) too, if not how can I get them when
retrieved??
 
Back
Top