Neven
09.02.2011
Hi Neven,
I do not see any issue in this behavior. Your stored procedures returns an integer constant in this column. When XPO retrieves data from your stored procedure the result set produced by the SqlDataReader contains an integer column. So, it throws an exception when tries to cast an integer value to the Double type specified in your code.
To return a Double value from a stored procedure, modify its select statement as follows:
[SQL]ALTER PROCEDURE [dbo].[vwsp_Test] @DatumOd datetime, @DatumDo datetime AS BEGIN SET NOCOUNT ON; SELECT *, TestError=CONVERT(float, 1) FROM dbo.vw_TestDb WHERE (OrderDate BETWEEN @DatumOd and @DatumDo) END
Thanks,
Michael.
Is your intention to post an answer to your own question?
- If so, then proceed.
- If you simply wanted to post additional information, ask for further clarification, or to just say "Thanks!", please click Leave a Comment.
- If you wish to edit your original question, please use the Edit button in the Toolbox at the top right corner of that entry.
Facebook
Twitter
Google+