2
Answers

No given Value for one or more required parameters

james james

james james

7y
218
1
I have a database Oledb. With several textbox and comboboxs. One combobox I have added numbers to selecte from 1,2,3 the Winform works fine but if i change the options to A,B,C I get No value given for one or more required parameter.The oledb / Access file is set to Short text. 
Any idea why this happens?
 
Thanks
 
Answers (2)
1
james james

james james

NA 175 2.9k 7y
I created an Array in form load to solve the problem.
 
  1. private void Form1_Load(object sender, EventArgs e)  
  2.         {  
  3.             string[] Shift = new string[3];  
  4.   
  5.             Shift[0] = "Days";  
  6.             Shift[1] = "AfterNoon";  
  7.             Shift[2] = "Nights";  
  8.             cb_Shift_F1.Items.AddRange(Shift);  
  9.         }  
 
0
Chetan Ranpariya

Chetan Ranpariya

NA 1.6k 234 7y
Can you share the code which gives the error along with the table structure?