Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27554

VS 2010 [DATASET]Small Problem

$
0
0
I have a combobox that is populated in the form's load event.

Below i want to update a different textbox in the combobox's SelecedIndexChanged event
The data in combobox is the primary key in the datatable and i want to use that value as the index.

Normally you can do the by the following exapmple

PHP Code:

dataset.table.Item("value").column.ToString 

The problem is, use the variable, it gives me following error:

Code:

Option Strict On disallows implicit conversions from 'String' to 'Integer
My Code:
PHP Code:

Dim currentID As String CStr(orderIDCombobox.SelectedItem)
orderDateTetxbox.Text csDs.Orders.Item(currentID).OrderDate.ToString 

So how do i get the code accept my variable a string and not expect an integer.

Another option I tried was to retrieve the index number via the primary key and then specifying that variable as the index as needed, but i could not get that to work

I need some help please

Viewing all articles
Browse latest Browse all 27554

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>