-
November 23rd, 2010, 04:29 AM
#1
ComboBox requieres selected value when connected by Datasource
Good morning,
I am using a combobox which is connected by data source with a table. On this table I do a Select distinct with some filters. Everything is fine except the fact that when I click on the combobox and dont select a value the app hangs until I select one value.
Sometimes I have this error, sometimes no.
I call the value by the sub load:
Code:
Me.Empleados1TableAdapter.FillByActiveInsepc(Me.SHFDataSet.Empleados1)
Any ideas what I am doing wrong?
-
November 23rd, 2010, 10:50 AM
#2
Re: ComboBox requieres selected value when connected by Datasource
In the DS construction, when you add fields to a DT I believe the default for NullValue is to "(Throw exception)". You can change this setting which, I believe, will allow for null entries.
-
November 23rd, 2010, 11:08 AM
#3
Re: ComboBox requieres selected value when connected by Datasource
Good point, but when I try to change this value for the field to Nothing or Empty it tells me, it is not allowed. It makes sense because those are primary keys but in the view later I just want to have a dropdownmenu and wont change anything in the table
-
November 23rd, 2010, 12:35 PM
#4
Re: ComboBox requieres selected value when connected by Datasource
Find out how the DB is storing a blank, or better yet, set it to a default value that won't crash the app.
-
November 23rd, 2010, 01:14 PM
#5
Re: ComboBox requieres selected value when connected by Datasource
just wanna that the combobox doesnt give attention to what it is selected because later I just need the value which is selected for another sql query
-
November 23rd, 2010, 04:15 PM
#6
Re: ComboBox requieres selected value when connected by Datasource
Set the SELECTED ITEM = -1 (Unselected)
-
November 24th, 2010, 06:55 AM
#7
Re: ComboBox requieres selected value when connected by Datasource
I deleted now the combox box which I dropped out of the data source and created one out of the toolbox, connected it with the table and now its working
Thx
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|