The Wrecking Bawl
Destructuring query language, one keyword at a time.
Site Sections
Home
Contact
Syndication
Login
Posts
119
Comments
112
Trackbacks
22
<< resharper clean-up gotcha
|
Home
|
comcast blocking port 25? >>
tinyint surprise
I just discovered something rather surprising. If you return a tinyint from a stored procedure as part of a dataset, and bind that dataset to a dataview, and then do something like this:
<asp:Label runat="server" id="statusLabel" Text='<%# GetStatusText( (int)DataBinder.Eval(Container, "DataItem.status")) %>'>
</asp:Label>
You will get an error about an invalid cast. If the stored procedure returns an int instead of tinyint, it works just fine. How can ASP.Net 3.5 not be able to cast from a tinyint (or whatever its C# equivalent is) to an int??
posted on Tuesday, February 10, 2009 1:05 PM
Print
Comments
No comments posted yet.
Post Comment
Title
*
Name
*
Email
Url
Comment
*
Remember Me?
Enter the code shown above
Archives
July, 2009 (1)
June, 2009 (1)
April, 2009 (3)
March, 2009 (1)
February, 2009 (2)
August, 2008 (2)
June, 2008 (1)
May, 2008 (1)
April, 2008 (4)
February, 2008 (3)
January, 2008 (1)
December, 2007 (1)
November, 2007 (1)
October, 2007 (2)
September, 2007 (2)
August, 2007 (3)
July, 2007 (2)
June, 2007 (7)
May, 2007 (6)
April, 2007 (5)
March, 2007 (18)
February, 2007 (22)
January, 2007 (18)
December, 2006 (12)
Post Categories
all tech stuff
all the other stuff
C#
SQL Server
general .Net stuff
News
Copyright © 2005 Alex Bransky
This work is licensed under a
Creative Commons License