By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,285 Members | 2,124 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,285 IT Pros & Developers. It's quick & easy.

how to store the ids and the names in the combo box and build an a

P: n/a
how to store the names and their id's in the combo box and build an array
from those selected. Please note in my GUI, I have a combobox that would have
names. I need to pass in the

I want to query positions table, the function for that in
proxy class is mentioned below, where AssetList is an XML node containing a
list of one or more Assets.Assset is an XML node with the attribute of it's
unique id number.AssetID is the unique identification number of the asset.

This is the function
Public Function ExportPositions(ByVal SessionID As String, ByVal
StartDateTime As Date, ByVal EndDateTime As Date,
<System.Xml.Serialization.XmlArrayItemAttribute("A ssetID",
IsNullable:=false)> ByVal AssetList() As Long) As Position()
Dim results() As Object = Me.Invoke("ExportPositions", New Object()
{SessionID, StartDateTime, EndDateTime, AssetList})

Return CType(results(0),Position())

End Function
I do this:

doc.LoadXml(EDP.ExportPositions(cmbSelectdata.Sele ctedItem,
cmbStartDateandTime.Text, cmbEndDateandTime.Text,
(cmbAsset.SelectedItem)).ToString)

But, I get the error: System.Invalid cast exception converting System.String
to System.Int64[] for cmbAsset

Mar 1 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.