Home Forums SQL Server 7,2000 T-SQL Return a Table from a Stored Procedure RE: Return a Table from a Stored Procedure

  • Hi

    You would generally return the results in a RecordSet.

    Set RS=Server.CreateObject("Adodb.Recprdset")

    RS.ActiveConnection="Some connection to a database"

    Sql = "Select Id, Name From Users Where Name like '%Smi%'

    Set RS=RS.Open SQL

    If Not RS.Eof Then

    While Not Rs.Eof

    Response.Write("Id =" & RS("Id") & " - ")

    Response.Write("Name =" & RS("Name") & " ")

    RS.MoveNext

    WEND

    End If

    Hope it helps