Passing GUID from cookie to cfstoredproc as cfprocparam
Posted on 2009-04-21
I have a DB structure that uses SQL Server uniqueidentifier fields as Keys on all it's tables. There are times when these ID's are necessary to access user info from the Cold Fusion UI. These values are stored as session cookies.
I am getting the following error:
Error Executing Database Query.
[Macromedia][SQLServer JDBC Driver][SQLServer]Error converting data type varchar to uniqueidentifier.
Whenever I try to use a cfprocparam to run a stored procedure from the cold fusion site.
<cfprocparam type="in" cfsqltype="cf_sql_char" dbvarname="@MemberID" value="#cookie.MEMID#" />
fails with cf_sql_char, and cf_sql_idstamp.