Wednesday, May 09, 2007

Numeric DataTypes, SQL to XML

For reference: http://msdn2.microsoft.com/en-us/library/ms187745.aspx

I'm working on an app where the datafield (in SQL) was set as a tinyint (-255 to 255). The typed dataset in the app used a byte (-128 to 128). Problems occured as the datafield received or needed to use values bigger than 128 or 255.

An unsigned byte would have gone from 0 to 255.

I'm updating both fields to do -32,768 to 32,767. This will be a smallint on the SQL side, and a Short on the dataset side.

I'd love to find a reference that translates SQL datatypes to dataset/xml datatypes. If you know of one, comment here.

No comments: