Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Parameter not passed to stored procedure

Status
Not open for further replies.

leveetated

Programmer
Jan 24, 2008
46
US
CR 8.5
SQL Server 2000

Hello CR experts,

I've scanned, searched, dug, and tried to find someone with the same issue but no success.

I have a stored proc:
Code:
SET QUOTED_IDENTIFIER ON 
GO
SET ANSI_NULLS OFF 
GO

ALTER      PROCEDURE myProc

AS
DECLARE @filepath varchar(250)

	BEGIN
		
		INSERT INTO myTable
		VALUES (SUSER_SNAME(), @filepath, GetDate() )
		SELECT * FROM myTable

	END

GO
SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS ON 
GO


I have a subreport with the above sproc as its data source, and the main report has a formula called filepath (with FileName as its only content, to return the file name of the report that's run) that is linked to the sproc parameter called by the subreport.

When the report is run, the username and date are inserted correctly, but the filepath is not. Data types, lengths, etc match up.

Any ideas on what I'm doing wrong? I think I'm missing a step...

Thanks to all for ideas. best wishes.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top