all groups > sql server reporting services > july 2005 >
You're in the

sql server reporting services

group:

use parameter for stored procedure


use parameter for stored procedure happyd119
7/1/2005 3:51:01 PM
sql server reporting services:
Hi,

I tried to use report parameter with a stoed procedure that its parameter
type is UNIQUEIDENTIFER. When I execute the data set, I got ivalid data type
converting error (Syste.String -> String.Guid). Is ther a way to pass GUID
as parmeter value to stored procedure?

Re: use parameter for stored procedure Wayne Snyder
7/3/2005 7:50:02 AM
The problem is that SQL does not implicitly convert a string ( which is your
parameter type - there is no guid parameter type ) to a GUID... So, define
the parameter in SQL as a Char (36), then convert it to a guid in the SP ie

create proc myproc ( @myCharGuid char(36) )
as

Declare @myGuid uniqueidentifier
Select @myGuid = convert(uniqueidentifier, @myCharGuid)

Hope this helps

--
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)

I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org

[quoted text, click to view]

Re: use parameter for stored procedure happyd119
7/5/2005 6:35:02 PM
Hi Wayne,

Yes. I tried to convert to nvarchar and works.
I have another question. Looks like I need to convert uniqueidentifier type
to varchar then it can render in report's table. Is that true? Thanks

[quoted text, click to view]
AddThis Social Bookmark Button