Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2001-02-26 : 23:03:47
|
sigal writes "Im running the following stored procedure:
CREATE PROCEDURE sp_AdslUsers AS
...
declare adsl CURSOR FOR SELECT ... from help.adsl_tbl AS AdslTbl OPEN adsl FETCH NEXT FROM adsl INTO ... WHILE @@FETCH_STATUS = 0 BEGIN DECLARE adsl_check CURSOR FOR select ... from help.adsl_mem OPEN adsl_check FETCH NEXT FROM adsl_check
. . .
UPDATE help.adsl_tbl SET Change_Status = 0, ChangeStatusDate = GETDATE() WHERE UID = @UID
CLOSE adsl_check DEALLOCATE adsl_check
FETCH NEXT FROM adsl INTO ... END
CLOSE adsl DEALLOCATE adsl
When running it from SQL analyzer by exec sp_AdslTbl, it compete succefully, while running it from an ASP page white the following syntax, it fails after only few fetching of the extrenal loop - the adsl cursor, what should I do
This is the following code, while running through ASP:
set cmd = server.createobject("ADODB.Command") set cmd.ActiveConnection = conn with cmd .CommandText = "sp_AdslUsers" .CommandType = adCmdStoredProc .Execute , , adExecuteNoRecords end with" |
|
|
|
|
|