[HELP ASP] Recordset chiuso
Posted by Sonia on 15-10-2007 15:24
Ciao a tutti... ho un problema che mi sta facendo a dir poco impazzire

Prima di tutto, utilizzo ASP 3.0 e Sql Server 2000

Ho una stored procedure che crea tabelle temporanee, mi fa un po' di calcoli e alla fine restituisce tutto ciò che mi serve (non so se può essere utile, ma l'ultima select è una SELECT * FROM #TMP )

Nella mia bella (si fa per dire) paginetta ASP richiamo la USP, passandogli i suoi 3 parametri

Set objCommand = Server.CreateObject("ADODB.Command")
Set objRS = Server.CreateObject("ADODB.Recordset")
with objCommand
.ActiveConnection = objConnection
.CommandText= "USP"
.CommandType = adCmdStoredProc
end with
with objCommand.Parameters
.Refresh
.Item("@Par1") = Par1
.Item("@Par2") = Par2
.Item("@Par3") = Par3
end with
objRS.open objCommand, , adOpenForwardOnly, adLockReadOnly


Ma quando vado per estrarre quel che mi ha salvato in objRs, mi dice che il recordset è chiuso e infatto il suo .state è 0.
Ho provato ad eseguire la usp a parte, con gli stessi parametri che gli passo dall'asp, e mi restituisce risultati...
Quindi penso che non ci sia comunicazione tra usp e command/recordset...

Qualcuno mi sa aiutare?
Powered by: vbHome (lite) v3.8 and vBulletin v2.3.1
Copyright © 2000 - 2002 Jelsoft Enterprises Limited