I have a SQL Database table with MyField datatype of smallint. Using VisualStudio 2003, I have created a dataAdapter and generated a dataset/datatable to Select/Update etc the above Sql Table. On my VB.Net Form, I have a TextBox control who's Text property is bound to MyDataView (which is bound to the datatable).
Originally, if I put a value in my TextBox of over 32767(Int16), then it would immediately revert back to it's original value. Realising this was because when generating the DataTable, VisualStudio2003 assigned this column the dataType Int16. Needing a higher value, I opened up the DataSet Schema and manually changed the Type of MyField from Short(Int16) to Int(Int32). This allowed higher values to remain (up to 2,147,483,647), but still throws an OverflowException when the DataAdapter.Update() is called. The error message returned is: "Value was either too large or too small for an Int16".
Problem: What have I missed out to change the DataType from Int16 to Int32 which the Update method calls? Or how can I force all SQL Fields with a smallint DataType to a VB Col DataType of Int32 and not Int16?