We have this stored procedure. It works fine if I comment out @imageHeader
declaration, but once I put it in, and pass it in, I get an error from CF
saying
[Macromedia][SQLServer JDBC Driver]Value can not be converted to requested
type.
Here is the cf code I use to call it, followed by the stored proc.
<cfstoredproc procedure="uspNodeManagerUpdateScreen"
datasource="#application.dsnNxpn#" returncode="Yes">
<cfprocparam type="in"
cfsqltype="cf_sql_integer"
dbvarname="@ownerId"
value="#attributes.ownerId#"
null="no">
<cfprocparam type="in"
cfsqltype="cf_sql_integer"
dbvarname="@groupParentId"
value="#attributes.groupParentId#"
null="no">
<cfprocparam type="in"
cfsqltype="cf_sql_integer"
dbvarname="@screenId"
value="#attributes.screenId#"
null="no">
<cfprocparam type="in"
cfsqltype="cf_sql_varchar"
dbvarname="@screenName"
value="#attributes.screenName#"
null="no">
<cfprocparam type="in"
cfsqltype="cf_sql_varchar"
dbvarname="@screenKey"
value="#attributes.screenKey#"
null="no">
<cfprocparam type="in"
cfsqltype="cf_sql_integer"
dbvarname="@namespaceId"
value="#attributes.namespaceId#"
null="no">
<cfprocparam type="in"
cfsqltype="cf_sql_integer"
dbvarname="@isSecure"
value="#attributes.isSecure#"
null="no">
<cfprocparam type="in"
cfsqltype="cf_sql_varchar"
dbvarname="@imageHeader"
value="test"
null="no">
<cfprocparam type="out"
cfsqltype="cf_sql_integer"
dbvarname="@outScreenId"
variable="caller.outScreenId"
null="no">
</cfstoredproc>
CREATE proc dbo.uspNodeManagerUpdateScreen
@ownerId int,
@groupParentId int,
@screenId int,
@screenName varchar(50),
@screenKey varchar(100),
@namespaceId int,
@isSecure int,
@imageHeader varchar(100),
@outScreenId int OUTPUT
as
set nocount on
select @outScreenId = @screenId
if (@screenId = 0)
begin
if not exists (
select
ms_group_id
from
ms_group_owner
where
ms_owner_id = @ownerId
and ms_group_id = @groupParentId
)
begin
return 101
end
insert into screen (
name,
screenKey,
namespaceId,
groupId,
groupParentId,
ownerId,
isPublishable,
htmlTypeId,
isSecure--,
--imageHeader
)
values (
@screenName,
@screenKey,
@namespaceId,
@groupParentId, -- fix later, should be groupId
@groupParentId,
@ownerId,
0,
1,
@isSecure--,
[EMAIL PROTECTED]
)
if @@error <> 0
begin
return -100
end
select @outScreenId = @@identity
return 1
end
else
begin
-- verify owner access to group parent
if not exists (
select
s.groupParentId
from
screen as s
inner join ms_group_owner as o on (
o.ms_group_id =
s.groupParentId
and o.ms_owner_id = @ownerId
)
where
s.screenId = @screenId
)
begin
return 101
end
update screen
set
name = @screenName,
screenKey = @screenKey,
namespaceId [EMAIL PROTECTED],
groupParentId = @groupParentId,
ownerId = @ownerId,
isSecure = @isSecure--,
--imageHeader = @imageHeader
where
screenId = @screenId
if @@error <> 0
begin
return -100
end
select @outScreenId = @screenId
return 2
end
set nocount off
GO
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183814
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54