PC Review


Reply
Thread Tools Rate Thread

DataTable.TableName returns "Table"??

 
 
Antonio Ooi
Guest
Posts: n/a
 
      9th Mar 2005
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


 
Reply With Quote
 
 
 
 
Peter Rilling
Guest
Posts: n/a
 
      9th Mar 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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>



 
Reply With Quote
 
Antonio Ooi
Guest
Posts: n/a
 
      9th Mar 2005
I see, logical. Thanks a lot!

Antonio

"Peter Rilling" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
>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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> 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
>>

>
>



 
Reply With Quote
 
=?Utf-8?B?Q293Ym95IChHcmVnb3J5IEEuIEJlYW1lcikgLSBN
Guest
Posts: n/a
 
      9th Mar 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
>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DataTable.TableName returns "Table"?? Antonio Ooi Microsoft Dot NET Framework 3 9th Mar 2005 07:57 PM
DataTable.TableName returns "Table"?? Antonio Ooi Microsoft ADO .NET 3 9th Mar 2005 07:57 PM
Re: Column "NAME" does not belong to table TableNAME. Val Mazur Microsoft ADO .NET 0 12th May 2004 04:41 AM
Re: Column "NAME" does not belong to table TableNAME. William Ryan eMVP Microsoft ADO .NET 0 11th May 2004 08:38 PM
Pivot table returns "Problems obtainig data" jorge Microsoft Excel Misc 0 9th Oct 2003 09:52 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:21 PM.