Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.databases.ms-sqlserver > #1191

Re: SSE2008: #Tables, Stored Procedures, Avoiding ActiveX

From "Bob Barrows" <reb01501@NOyahooSPAM.com>
Newsgroups comp.databases.ms-sqlserver
Subject Re: SSE2008: #Tables, Stored Procedures, Avoiding ActiveX
Date 2012-07-31 14:12 -0400
Organization A noiseless patient Spider
Message-ID <jv976k$ctp$1@dont-email.me> (permalink)
References <b3ge181eguiicnuugkkak08jcpq3a0hmgd@4ax.com> <XnsA0A17141AB34CYazorman@127.0.0.1> <cj0g181jboo2s984amhsd95199t3cs5jes@4ax.com>

Show all headers | View raw


Gene Wirchenko wrote:
> On Tue, 31 Jul 2012 09:08:01 +0000 (UTC), Erland Sommarskog
> <esquel@sommarskog.se> wrote:
>
>> Why wouid you creaet the temp table at all? Why not just return a
>> result set
>>
>>   SELECT 0 AS OrderBy, 'Key not found.' AS ErrorReponse
>
>      I gave a simple example of error return.  There may be more rows;
> OrderBy is for presenting them in the correct order.  The additional
> rows may be added one at a time so I went with a table.  Is there a
> better way?
>
>> Also, most clients gets confused if a stored procedure returns two
>> results sets with different shape. Of course, it's perfectly
>> manageable if you program the client correctly, but it's a little
>> dubious.
>
>      (I do not know what to call the level that is between the browser
> and SQL Server.
Web Server

>  It a) receives the HttpXMLRequest and queries SQL and
> b) receives the resultset from SQL Server and packages it for the
> browser.  What is it called?  I will now refer to it as Glue.)

It depends on the technology you are using. With IIS, you might be using
ASP.Net or ASP. With Apache, you might be using php.

>      IIUC, you are saying that if I try to return more than one table?

No, more than one resultset. The result of a select statement is a
resultset.


> Not the case.  Either I return the table data requested, or I return
> error data.
OK, but the two resultsets have different schemas and your code in the web
server page will need to be able to handle that.

> I do not even know how I would return more than one
> resultset.

Err ...
multiple select statements in a batch will return multiple resultsets

> Is it even possible?
Certainly. For example, ADO has a NextRecordset method that retrieves the
next pending resultset from a sql batch being executed by a Command object.

> SQL Server seems to return just the
> last query results.
No, in SSMS or Query Analyzer, if you run multiple selects in a batch,
either client tool will handily display all resultsets returned.

> Maybe, that is a function of my Glue layer.
No, it's a function of the data access technology you are using in your web
server code - see my reference to ADO above

I am familiar with ASP and ASP.Net. It sounds as if you don't want to use
either technology so you will need to find a newsgroup or forum that focuses
on the technology you wish to use.

Back to comp.databases.ms-sqlserver | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

SSE2008: #Tables, Stored Procedures, Avoiding ActiveX Gene Wirchenko <genew@ocis.net> - 2012-07-30 19:37 -0700
  Re: SSE2008: #Tables, Stored Procedures, Avoiding ActiveX Gene Wirchenko <genew@ocis.net> - 2012-07-30 19:47 -0700
  Re: SSE2008: #Tables, Stored Procedures, Avoiding ActiveX Erland Sommarskog <esquel@sommarskog.se> - 2012-07-31 09:08 +0000
    Re: SSE2008: #Tables, Stored Procedures, Avoiding ActiveX Gene Wirchenko <genew@ocis.net> - 2012-07-31 09:26 -0700
      Re: SSE2008: #Tables, Stored Procedures, Avoiding ActiveX "Bob Barrows" <reb01501@NOyahooSPAM.com> - 2012-07-31 14:12 -0400
        Re: SSE2008: #Tables, Stored Procedures, Avoiding ActiveX Gene Wirchenko <genew@ocis.net> - 2012-07-31 15:02 -0700
          Re: SSE2008: #Tables, Stored Procedures, Avoiding ActiveX Erland Sommarskog <esquel@sommarskog.se> - 2012-08-01 21:04 +0200
      Re: SSE2008: #Tables, Stored Procedures, Avoiding ActiveX Erland Sommarskog <esquel@sommarskog.se> - 2012-07-31 21:45 +0200
        Re: SSE2008: #Tables, Stored Procedures, Avoiding ActiveX Gene Wirchenko <genew@ocis.net> - 2012-07-31 15:02 -0700
          Re: SSE2008: #Tables, Stored Procedures, Avoiding ActiveX Erland Sommarskog <esquel@sommarskog.se> - 2012-08-01 20:59 +0200
            Re: SSE2008: #Tables, Stored Procedures, Avoiding ActiveX Gene Wirchenko <genew@ocis.net> - 2012-08-01 13:30 -0700
              Re: SSE2008: #Tables, Stored Procedures, Avoiding ActiveX Erland Sommarskog <esquel@sommarskog.se> - 2012-08-01 23:27 +0200
  Re: SSE2008: #Tables, Stored Procedures, Avoiding ActiveX "Bob Barrows" <reb01501@NOyahooSPAM.com> - 2012-07-31 14:25 -0400
    Re: SSE2008: #Tables, Stored Procedures, Avoiding ActiveX Gene Wirchenko <genew@ocis.net> - 2012-07-31 15:02 -0700
      Re: SSE2008: #Tables, Stored Procedures, Avoiding ActiveX Jeroen Mostert <jmostert@xs4all.nl> - 2012-08-01 00:26 +0200
        Re: SSE2008: #Tables, Stored Procedures, Avoiding ActiveX Gene Wirchenko <genew@ocis.net> - 2012-07-31 17:43 -0700
          Re: SSE2008: #Tables, Stored Procedures, Avoiding ActiveX "Bob Barrows" <reb01501@NOSPAMyahoo.com> - 2012-08-01 06:29 -0400
            Re: SSE2008: #Tables, Stored Procedures, Avoiding ActiveX Jeroen Mostert <jmostert@xs4all.nl> - 2012-08-01 20:40 +0200
              Re: SSE2008: #Tables, Stored Procedures, Avoiding ActiveX Erland Sommarskog <esquel@sommarskog.se> - 2012-08-01 21:02 +0200
              Re: SSE2008: #Tables, Stored Procedures, Avoiding ActiveX "Bob Barrows" <reb01501@NOyahooSPAM.com> - 2012-08-01 16:02 -0400
          Re: SSE2008: #Tables, Stored Procedures, Avoiding ActiveX Jeroen Mostert <jmostert@xs4all.nl> - 2012-08-01 20:29 +0200
      Re: SSE2008: #Tables, Stored Procedures, Avoiding ActiveX Erland Sommarskog <esquel@sommarskog.se> - 2012-08-01 09:14 +0200
        Re: SSE2008: #Tables, Stored Procedures, Avoiding ActiveX Jason Keats <jkeats@melbpcDeleteThis.org.au> - 2012-08-04 18:14 +1000
          Re: SSE2008: #Tables, Stored Procedures, Avoiding ActiveX Erland Sommarskog <esquel@sommarskog.se> - 2012-08-04 21:15 +0200
            Re: SSE2008: #Tables, Stored Procedures, Avoiding ActiveX Jason Keats <jkeats@melbpcDeleteThis.org.au> - 2012-08-05 18:10 +1000
              Re: SSE2008: #Tables, Stored Procedures, Avoiding ActiveX Erland Sommarskog <esquel@sommarskog.se> - 2012-08-05 10:50 +0200
                Re: SSE2008: #Tables, Stored Procedures, Avoiding ActiveX Jason Keats <jkeats@melbpcDeleteThis.org.au> - 2012-08-06 00:03 +1000
                Re: SSE2008: #Tables, Stored Procedures, Avoiding ActiveX Erland Sommarskog <esquel@sommarskog.se> - 2012-08-05 20:21 +0200
                Re: SSE2008: #Tables, Stored Procedures, Avoiding ActiveX Jason Keats <jkeats@melbpcDeleteThis.org.au> - 2012-08-06 19:44 +1000
                Re: SSE2008: #Tables, Stored Procedures, Avoiding ActiveX Erland Sommarskog <esquel@sommarskog.se> - 2012-08-06 20:54 +0200

csiph-web