scusate come faccio a testare il fatto che una stored procedure non mi restituisca nessun recordset?
esempio:
store:
CREATE PROCEDURE dbo.spprova
AS
RETURN
GO
pagina asp:
dim rec
set cn=Server.CreateObject("ADODB.Connection")
set rec=Server.CreateObject("ADODB.recordset")
Set com = Server.CreateObject("ADODB.Command")
cn.ConnectionString = DSN_DB1
cn.open
strsql = "" & DB_Ristorazione & "..spprova "
com.ActiveConnection = cn
com.CommandText = strSql
Set rec = com.Execute
'rec.Open strsql,cn
if not rec.EOF then
if rec("messaggio") <> "" and rec("messaggio") <> "OK" then
Response.Write "<div class=m-err><center>" & rec("messaggio") & "</center></div>"
Response.End
end if
end if
rec.Close
cn.Close
set cn=nothing
mi dà questo errore
Operation is not allowed when the object is closed.
quando cerco di testare l'EOF, effettivamente nel caso in questione il recordset non esiste ancora,c'è una qualche funzione che mi restituisce questo caso?
grazie 1000

Rispondi quotando
