on 2006 Jul 28 7:54 AM
Hi,
when am using this code to populate my combobox
oDbds = oForm.DataSources.DBDataSources.Add("OITM")
oDbds.Query()
For i = 0 To oDbds.Size - 1
ocombo.ValidValues.Add(oDbds.GetValue("ItemCode"), i)
Next
the following error is promted..
Argument not specified for parameter Description of Public Function Add(value as String,Description as String) as sapbouiCom.ValidValue.
can someone help me to sort this out.
thanks
Mini
Hey Mini
Try this:
For i = 0 To n - 1
s = DBDS1.GetValue(0, i).ToString
ss = CInt(s)
Next i
0 should be the nr a column
Hope this helps
Krzysztof Sala
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mini,
What I do see in your code is that method GetValue should get 2 parameters instead of 1, and the second parameter for Add, i is a number, and the method should get a string. So if you use i.ToString() instead of i, I think it should work.
On the other hand, if what you want to do is to show all the values from the OITM in the combobox, you could use the DBDataSource directly. Have a look here, topic "Bind DBDataSource to ComboBox":
/people/ibai.pea/blog/2006/07/26/sbo-faq
Hope helps,
Ibai Peña
Message was edited by: Ibai Peña
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ibai,
Thanks for replying
Actually i tried using .tostring() along with i but that didnt help me out.
Now i have bounded the combobox with database but my drop down list does not work there and moreover i have to refine my select query based on a condition to.
CAn you help me in resolving it...
Thank you
Mini
User | Count |
---|---|
104 | |
8 | |
6 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.