Hi,

I get a DataTable based on this simple query:
SELECT * FROM Customers

Later, I want to know just the table name because I do not want to play with
the string within the SELECT statement. I expect DataTable.TableName to give
me an exact name, i.e. "Customers", but it gives me "Table" regardless of
what query from what table. Can someone gives me some clarifications on the
TabeName property? Thanks in advance.

Regards,
Antonio

Re: DataTable.TableName returns "Table"?? by Peter

Peter
Tue Mar 08 23:06:12 CST 2005

I do not think this has anything to do with the query because suppose you
run the query "select * from Table1, Table2", then what would be the name of
the DataTable? You can set the table name if you want.

"Antonio Ooi" <antoniooi@homail.com> wrote in message
news:exBi2qFJFHA.1416@TK2MSFTNGP10.phx.gbl...
> Hi,
>
> I get a DataTable based on this simple query:
> SELECT * FROM Customers
>
> Later, I want to know just the table name because I do not want to play
> with the string within the SELECT statement. I expect DataTable.TableName
> to give me an exact name, i.e. "Customers", but it gives me "Table"
> regardless of what query from what table. Can someone gives me some
> clarifications on the TabeName property? Thanks in advance.
>
> Regards,
> Antonio
>



Re: DataTable.TableName returns "Table"?? by Antonio

Antonio
Tue Mar 08 23:30:59 CST 2005

I see, logical. Thanks a lot!

Antonio

"Peter Rilling" <peter@nospam.rilling.net> wrote in message
news:%23dgn8WGJFHA.2604@TK2MSFTNGP15.phx.gbl...
>I do not think this has anything to do with the query because suppose you
>run the query "select * from Table1, Table2", then what would be the name
>of the DataTable? You can set the table name if you want.
>
> "Antonio Ooi" <antoniooi@homail.com> wrote in message
> news:exBi2qFJFHA.1416@TK2MSFTNGP10.phx.gbl...
>> Hi,
>>
>> I get a DataTable based on this simple query:
>> SELECT * FROM Customers
>>
>> Later, I want to know just the table name because I do not want to play
>> with the string within the SELECT statement. I expect DataTable.TableName
>> to give me an exact name, i.e. "Customers", but it gives me "Table"
>> regardless of what query from what table. Can someone gives me some
>> clarifications on the TabeName property? Thanks in advance.
>>
>> Regards,
>> Antonio
>>
>
>



RE: DataTable.TableName returns "Table"?? by NoSpamMgbworld

NoSpamMgbworld
Wed Mar 09 13:57:05 CST 2005

MyDataAdapter.TableMappings.Add("Table", "NameIWishToUseForTable");

---

Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************

"Antonio Ooi" wrote:

> Hi,
>
> I get a DataTable based on this simple query:
> SELECT * FROM Customers
>
> Later, I want to know just the table name because I do not want to play with
> the string within the SELECT statement. I expect DataTable.TableName to give
> me an exact name, i.e. "Customers", but it gives me "Table" regardless of
> what query from what table. Can someone gives me some clarifications on the
> TabeName property? Thanks in advance.
>
> Regards,
> Antonio
>
>
>