Board index » Visual Studio » sp not returning recordset to ASP/VBS page
|
myc
|
sp not returning recordset to ASP/VBS page
Visual Studio37
Hi, I basically copied and editted sp_databases to only show me dbs over a certain size and tested it in Query Analyzer and it works fine. I wrote an asp page (and tried it through VBScript as well) that calls the stored procedure. I checked with Profiler and the sp is getting executed by my asp page so I don't think its an issue with my permissions but its not returning a recordset nor generating any errors (and i checked SQL server logs and Event logs as well). The recordset is simply null. =============VBScript================= DSN = "Provider=SQLOLEDB; Data Source=SERVER; Initial Catalog=Master; User ID=naria; Password=mypsd;" Set conn = CreateObject("ADODB.Connection") Set cmd = CreateObject("ADODB.Command") Set rs = CreateObject("ADODB.Recordset") conn.Open(myDSN) cmd.ActiveConnection = conn cmd.CommandText = "sp_databasesCOPY" cmd.CommandType = adCmdStoredProc ' I tried with 4 also cmd.ActiveConnection = conn Set rs = cmd.Execute() rs.movefirst Do while NOT (rs.Eof) msgbox("hello") 'some code here to write to a file but the Hello doesn't even show rs.movenext Loop ======================= what am i doing wrong? Any feedback would be appreciated. Thanks in advance Ayla - |
