Re: Named Recordsets from SProcs?

From: A Traveler (hitchhikersguideto-news_at_yahoo.com)
Date: 09/01/04


Date: Wed, 1 Sep 2004 09:41:13 -0400


Yeah. i dont generally do unfiltered SELECT *'s except on things like lookup
tables where its just a small set of ID/TEXT combinations.

"William (Bill) Vaughn" <billvaRemoveThis@nwlink.com> wrote in message
news:OfkkON6jEHA.2652@TK2MSFTNGP15.phx.gbl...
> No problem. Just consider that it's bad form to do a SELECT * and
> especially without a WHERE clause. IMHO the "DataTable" should have been
> called the "DataRowset" object. This way developers would know it's
> designed for rowsets, not entire tables. Sure, there are cases when the
> database is simple that fetching the whole table makes sense. It doesn't
> in production systems that you expect to scale.
>
> --
> ____________________________________
> William (Bill) Vaughn
> Author, Mentor, Consultant
> Microsoft MVP
> www.betav.com
> Please reply only to the newsgroup so that others can benefit.
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> __________________________________
>
> "A Traveler" <hitchhikersguideto-news@yahoo.com> wrote in message
> news:%23ya28%233jEHA.4092@TK2MSFTNGP10.phx.gbl...
>> Yah, i know they could get more complex, i just thought maybe there was
>> some way to do something like
>>
>> SELECT * FROM (SELECT whatever whatever) AS MYTableName
>>
>> Oh well... thanks anyway for ALL your help on my questions thus far.
>>
>>
>> "William (Bill) Vaughn" <billvaRemoveThis@nwlink.com> wrote in message
>> news:%23TIlkr3jEHA.3724@TK2MSFTNGP11.phx.gbl...
>>> Nope, but you can change the TableMappings collection to map Table,
>>> Table1 etc. to their correct names. The rowsets being returned from the
>>> SP don't have names so ADO has no way of knowing what to call them. Not
>>> all rowsets are simply SELECT * FROM myTable queries.
>>>
>>> --
>>> ____________________________________
>>> William (Bill) Vaughn
>>> Author, Mentor, Consultant
>>> Microsoft MVP
>>> www.betav.com
>>> Please reply only to the newsgroup so that others can benefit.
>>> This posting is provided "AS IS" with no warranties, and confers no
>>> rights.
>>> __________________________________
>>>
>>> "A Traveler" <hitchhikersguideto-news@yahoo.com> wrote in message
>>> news:OhaMTW3jEHA.3968@TK2MSFTNGP11.phx.gbl...
>>>> Hello,
>>>>
>>>> I have a SQL Server stored procedure which will return several
>>>> recordsets back to the caller (multiple SELECT statements).
>>>> By default when you call this stored proc from ADO.NET, you get back
>>>> the tables in the DataSet as Table, Table1, Table2, etc....
>>>> Is there anyway in the sproc that i can name them so that when they
>>>> come back to ADO, the DataSet contains them with friendly names, like
>>>> TBL_HEADER, TBL_DETAILS, TBL_LOCATIONS, etc.... ??
>>>>
>>>> Thanks in advance,
>>>>
>>>> - Hitchhiker.
>>>>
>>>
>>>
>>
>>
>
>



Relevant Pages

  • Re: Named Recordsets from SProcs?
    ... Yeah. ... i dont generally do unfiltered SELECT *'s except on things like lookup ... tables where its just a small set of ID/TEXT combinations. ...
    (microsoft.public.sqlserver.programming)
  • Re: Benching 55 lbs:How strong am I?
    ... Dont begin to scream that i am a racist, ... and therefore qualifies as a "Midget", has 15 inch calves. ... Yeah, i can imagine. ... and held my arm out. ...
    (misc.fitness.weights)
  • Re: 6-6 280 33, how do I get down to 210? I eat a lot
    ... self-aware, and start to nuke to root of all evil, the Middle East. ... Please dont get me wrong. ... But who has the itchy trigger ... Yeah, yeah, yeah, Japan. ...
    (misc.fitness.weights)
  • Re: NASCAR on RFactor is a joke
    ... Yeah I know it is frustrating, just as frustrating as the new mods for CALL ... TP_S_CC it is add on 'Nextell Nascar' addon for rFactor, ... I dont mind you asking for help, I dont even mind you bellyache'n about the ...
    (rec.autos.simulators)
  • Re: Lou Ferrigno?
    ... I started with "C-Ps Word of Muscle", ... Okay, VERY narrow hips as well, but the shoulders look ... (yeah, yeah, that song by Carly Simon...;) ... Funny thing is, when you are actually being honost, they dont listen. ...
    (misc.fitness.weights)