Named tables/Sql Server/Can't do TableMappings

  • Thread starter Thread starter Demi Moore
  • Start date Start date
D

Demi Moore

I have a stored proc that returns me multiple tables. Is there a way I could
set their names to be something other than TABLE TABLE1 TABLE2 ... ??

Sorry TableMappings won't do !! I can't use that for certain reasons. I have
to be able to do something in the T-Sql that after SqlDataAdapter.Fill, my
tables are named properly.

DM
 
Hi,

Why don't you iterate through Tables collection and set their name
accordingly after Fill has ended?
 
You can also use MS/DAAB and give it the name of your real tables, it will
manage them for you.

John
 
I don't think it is possible to do that directly thru stored procedures
only. I think what you are looking for is

(Select * from A) As MyCustomName ...

I could be wrong, but don't think that's do-able !! :-/ .. TableMappings is
the best second option.

- Sahil Malik
http://dotnetjunkies.com/weblog/sahilmalik
 
Back
Top