Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access_asp thread: Displaying results from a stored procedure


Message #1 by "Binu" <beanz75@a...> on Sat, 23 Mar 2002 02:47:37
Hi-

I am trying to display the results from a stored procedure in MS Access 
without any luck.  My code finds the stored procedure, but I receive an 
error message saying that either BOF or EOF is true.  How could this be?
If I take out objRS1.MoveFirst(), the code executes and displays a blank 
page.

    sql1="select * from qEmailAddressMembers"
    Set objRS1 = objConn.Execute(sql1)
    objRS1.MoveFirst()
    While Not objRS1.EOF
     Response.WRite objRS1("email")
    Wend

        objRS1.Close
        Set objRS1=nothing

Thanks,

Binu
Message #2 by "Binu" <beanz75@a...> on Sat, 23 Mar 2002 04:33:31
Strange?

When using OLEDB to connect to a datasource, I use the following code to 
return the results of a stored procedure in Access.  It Returns nothing.  
However, if I use an ODBC connection (DSN) - it displays the results from 
the stored procedure.  Does anyone know why this is?  How can i get this 
to work using OLEDB?

Set objRS = objConn.Execute ("exec qEmailAddressMembers")
objRS.MoveFirst()
   While not objRS.EOF
    Response.Write objRs("email")
    Response.Write "<BR>"
    objRS.MoveNext()
  Wend

  objRs.Close
   objConn.Close
Set objRs = nothing
   Set objConn = nothing

  Return to Index