P
PtrNrs
I am trying to create an SP which
(1) populates a temporary table from sp_helprotect ("INSERT . . .
EXEC sp_helprotect");
(2) cursors through the temp table to update a user table;
(3) displays the newly updated user table in Access ADP.
The routine works perfectly from Query Analyser, but fails with the
message "stored procedure executed correctly but did not return
records" when called from Access ADP.
The following code shows the problem distilled down to the absolute
basics. Called from Access ADP with @Switch = 0, - it works, otherwise
it fails.
So . . . there is some fundamental difference between sp_databases &
sp_helprotect. What is it.
I know I could use a workaround (reading sysprotects & sysobjects
directly) but I'd like to solve this problem as well.
--Test Code . . .
CREATE PROCEDURE dbo.Test
@Switch INT = 0
AS
BEGIN
SET NOCOUNT ON
SET DATEFORMAT dmy
IF(@Switch = 0) BEGIN
EXEC sp_databases
END ELSE BEGIN
EXEC sp_helprotect
END --IF
END
I will post some more detailed test code in another message - I thought
it might obscure the key issue.
(1) populates a temporary table from sp_helprotect ("INSERT . . .
EXEC sp_helprotect");
(2) cursors through the temp table to update a user table;
(3) displays the newly updated user table in Access ADP.
The routine works perfectly from Query Analyser, but fails with the
message "stored procedure executed correctly but did not return
records" when called from Access ADP.
The following code shows the problem distilled down to the absolute
basics. Called from Access ADP with @Switch = 0, - it works, otherwise
it fails.
So . . . there is some fundamental difference between sp_databases &
sp_helprotect. What is it.
I know I could use a workaround (reading sysprotects & sysobjects
directly) but I'd like to solve this problem as well.
--Test Code . . .
CREATE PROCEDURE dbo.Test
@Switch INT = 0
AS
BEGIN
SET NOCOUNT ON
SET DATEFORMAT dmy
IF(@Switch = 0) BEGIN
EXEC sp_databases
END ELSE BEGIN
EXEC sp_helprotect
END --IF
END
I will post some more detailed test code in another message - I thought
it might obscure the key issue.