Hello,
I have a visual C# application that is binded to a Sql server DB. I'm experiencing a lot of frustration when it comes to bind a combobox to a specific table. It seems that validation never succeeds.
Two tables are involved:
RMA
--------------------
RMA_Num - integer
FAB_Num - integer
...
FAB
--------------------
FAB_Num - integer
Desc - string
Of course you have guessed that the combobox is for the FAB field.
Here is how my combobox is set:
DataSource: FABBindingSourc e
DisplayMember: Desc
ValueMember: FAB_Num
SelectedValue: RMABindingSourc e - RMA_NUM
The list is perfectly displayed but when I select a value and try to save, the combobox field doesn't go through validation.
I'm more of a database guy so to see what was wrong, I change the type of RMA.FAB_Num from INT to Varchar(50) in the database; recreated my datatables and tried it again. Guess what? It worked: the FAB_Num (an integer) saved as a string in my database main table.
I'm completely lost. I don't want to use strings as IDs in my DB!!!!
Can someone help me figure how is this possible??
Thanks,
Justin
I have a visual C# application that is binded to a Sql server DB. I'm experiencing a lot of frustration when it comes to bind a combobox to a specific table. It seems that validation never succeeds.
Two tables are involved:
RMA
--------------------
RMA_Num - integer
FAB_Num - integer
...
FAB
--------------------
FAB_Num - integer
Desc - string
Of course you have guessed that the combobox is for the FAB field.
Here is how my combobox is set:
DataSource: FABBindingSourc e
DisplayMember: Desc
ValueMember: FAB_Num
SelectedValue: RMABindingSourc e - RMA_NUM
The list is perfectly displayed but when I select a value and try to save, the combobox field doesn't go through validation.
I'm more of a database guy so to see what was wrong, I change the type of RMA.FAB_Num from INT to Varchar(50) in the database; recreated my datatables and tried it again. Guess what? It worked: the FAB_Num (an integer) saved as a string in my database main table.
I'm completely lost. I don't want to use strings as IDs in my DB!!!!
Can someone help me figure how is this possible??
Thanks,
Justin
Comment