balor
Programmer
- Jul 24, 2000
- 74
If I try to execute a stored procedure including an insert into a temptable the sp don’t return any values. The problem only occurs when I am executing the sp from a Access project. The sp works fine in Query Analyzer.
It works on one of the servers I’m working against but I don’t know why and I can’t get it working on the others.
Any clue?
Try this to make the error occur:
1. Create the Stored Procedure that includes an insert to a temptable.
Example:
CREATE PROCEDURE dbo.TestTempInsert
AS
--Creates the temptable
CREATE TABLE
#TestTable
(
Column1 int PRIMARY KEY,
Column2 varchar(10)
)
--Insert into the temptable
INSERT INTO
#TestTable
(
Column1,
Column2
)
VALUES
(
1,
'Test'
)
--Returns the values in the temptable
SELECT
*
FROM
#TestTable
2. Try to execute it from Query Analyzer to be sure that it works.
3. Create a Access development project (.adp) and connect it to the SQL-server database with the test sp.
4. Try to execute the sp.
5. Do you get the same error as I do? The sp don’t return any values.
It works on one of the servers I’m working against but I don’t know why and I can’t get it working on the others.
Any clue?
Try this to make the error occur:
1. Create the Stored Procedure that includes an insert to a temptable.
Example:
CREATE PROCEDURE dbo.TestTempInsert
AS
--Creates the temptable
CREATE TABLE
#TestTable
(
Column1 int PRIMARY KEY,
Column2 varchar(10)
)
--Insert into the temptable
INSERT INTO
#TestTable
(
Column1,
Column2
)
VALUES
(
1,
'Test'
)
--Returns the values in the temptable
SELECT
*
FROM
#TestTable
2. Try to execute it from Query Analyzer to be sure that it works.
3. Create a Access development project (.adp) and connect it to the SQL-server database with the test sp.
4. Try to execute the sp.
5. Do you get the same error as I do? The sp don’t return any values.