Skip to content
Advertisement

Conversion failed when converting the “invalid” value ‘Residential’ to data type int

How do I convert data that is given from result set string. I am trying to show the drop down box gui as a text but give it a value of 1 and 2

what I want it to show as for drop down choice is right: https://i.imgur.com/gDKAkDX.png

but I need the actual values to be 1 and 2 correspondingly

Then I need to put those values back into a database f key that only allows int…

Advertisement

Answer

First create a class for storing the CusType_ID and CusTypeName in dropdown(combobox)

then store the value from your request

Finally, get your value back from selected item and store it in your new sql

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement