I am using a gridview for control parameters for a formview on the same page.
I keep getting the SQL Error below. I have painfully looked through the code to see what the deal is and I have a feeling it has to do with the control parameter. When I test the query in the wizard it gives me back what I should get back.
When I run the page and code I get the error below. This value is the CorpID and it is a varchar. So I am thinking the way the parameters are configured is not correct.
I have no issues with the Insert Template, just the edit template. So it eithers gives me the SQL error or the Formview does not appear.
Any guidance on how to map the parameters from a GrdiView would be aprreciated.
SQL Error:Conversion failed when converting the varchar value 'X123456' to data type int.
SQL for Form View
select userid, FirstName , LastName ,PermissionLevelDesc, a.Permissionlevelid as permissionlevelid,
case active_flg when 1 then 'Active'
else 'Inactive' end as Active_Status,active_flg,CorpID
from dbo.NPE_APP_Users a inner join dbo.NPE_APP_SEC_PROFILE b
on a.PermissionLevelID = b.PermissionLevelID
where userid = @userid and corpid=@corpid and a.permissionlevelid=@permissionlevel
View Complete Post