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??
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top