Re: Stores Procedures..

From: William \(Bill\) Vaughn (billvaRemoveThis_at_nwlink.com)
Date: 07/20/04


Date: Mon, 19 Jul 2004 19:09:24 -0700

Yo siento. Mi Espanol no es bastante bueno a contestarle en su lengua.
When you execute a stored procedure that does not return a rowset (from a
SELECT), the Recordset returned is "closed" (adStateClosed). this is normal
for a stored procedure. Either change the stored procedure by adding SET
NOCOUNT ON or step over the empty rowsets with NextRecordset.

hth

-- 
____________________________________
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.
__________________________________
"Coneection OLAP" <ConeectionOLAP@discussions.microsoft.com> wrote in
message news:93723BE2-0346-48EB-A93A-A4F07EADAE5A@microsoft.com...
> Hola A Todos:
>
> Mi Problema Es El Siguiente, Deseo Acceder A Un Procedure desde una Pagina
ASP
> El Código Que utilizo Es El Seguiente:
>
> Dim cnn, cmd, rst
> Dim sQuery, ls_SQL
>
> Set cnn = Server.CreateObject ( "ADODB.Connection" )
> Set rst = Server.CreateObject ( "ADODB.Recordset" )
>
> cnn.Open "Provider=SQLOLEDB.1;server=MXPOLFILE1; uid=USR_WEB2004;
pwd=aspnet; database=dbWaldosMart;"
>
> sQuery = "EXEC spS_MultiSelect'2','Sexo'"
> rst.Open sQuery, cnn
>
> While Not rst.EOF
> Response.Write("<br> " & rst(0).Value)
> rst.MoveNext
> Wend
>
> rst.Close()
> cnn.Close()
> Set rst = Nothing
> Set cnn = Nothing
>
> Y Al Momento Que Quiero Ver Los Resulados En La WEB, Me Manda  El
siguiente Mensaje De Error:
>
> ADODB.Recordset error '800a0e78'
> Operation is not allowed when the object is closed.
>
> Me Gustaria Saber Si Alguien Conoce El por Que Del Error Y Si Fuera Tan
ambale De Decirme Como Corregirlo..
>
> De Antemano Agradesco Su Atención...
>
> saludos..!!!
>
>
>


Relevant Pages

  • Re: Why cant variable assignment occur in a data retrieval operation?
    ... how to construct a rowset when some of the rowset should be sent to the ... AND ColB = @B ... I just ran across a peculiar "feature" in SQL server. ... if I try to return any result sets from my stored procedure as ...
    (microsoft.public.sqlserver.programming)
  • Re: Why cant variable assignment occur in a data retrieval operat
    ... stored procedure and then another select statement that uses those variables. ... portion of the select statement that you are not assigning to variables - but ... > how to construct a rowset when some of the rowset should be sent to the ... >> of me think of why SQL Server would prohibit this in a stored procedure. ...
    (microsoft.public.sqlserver.programming)
  • Re: The stored procedure executed successfully but did not return any records
    ... will return the results of the stored procedure to the adoTest ado.Recordset ... When I run this through Query Analyzer this ... > to generate a single rowset, however when I run in through the .ADP it ...
    (microsoft.public.access.adp.sqlserver)
  • Passing a rowset to a stored procedure?
    ... My application store the primary key and the timestamp values internally, ... I could of course easily create a stored procedure that takes the primary ... would have to call that 5 times meaning 5 times the overhead. ... Can I create a stored procedure that accepts a rowset, ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: how to: load data in gridview whitout DataSource
    ... Can you modify the stored procedure to join with another ... I'm triying to load data from store procedure into a gridview. ... El problema es que la ... uso un gridview con BoundsFields para los ...
    (microsoft.public.dotnet.framework.aspnet)