Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Picker Integer Selection Problem
Message
 
To
30/04/2005 17:30:56
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Environment versions
Environment:
VB.NET 1.1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01009940
Message ID:
01010366
Views:
23
Joe,


>When the following code is called I get an "Input string was not in a correct format." error:
>
>    Private Sub VisitorSelectionPicker_ItemSelected(ByVal sender As System.Object, ByVal e As OakLeaf.MM.Main.Windows.Forms.mmPickerItemSelectedEventArgs) Handles VisitorSelectionPicker.ItemSelected
>
>        ' Find the position of the primary key selected in the Picker
>        Dim visitorIdSelected As Integer = _
>            CInt(e.dsSelectedItems.Tables.Item(0).Rows(0).Item("VisitorId"))
>
>        ' TODO - Deterimine why Me.VisitorDataset assignment fails with "Input string was not in a correct format." error
>        Me.VisitorDataset = _
>            CType(Me.oVisitor.GetVisitorByVisitorId(visitorIdSelected), VisitorDataset)
>
>    End Sub
>
I’m not sure why you’re getting that error. I recommend trying the Convert.ToInt32() method instead.

Regards,

Kevin McNeish
Microsoft .NET/C# MVP
President, Oak Leaf Enterprises, Inc.
www.oakleafsd.com
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform