470,821 Members | 1,995 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,821 developers. It's quick & easy.

sending array data to web service-setting instance of array

I am sending data to a web service thru asp.net vb
Connection to web service is good and the header data goes over but the
subdata which is an arra is not going. I can not set the instance correctly.
MHSA says
The SubUnitData element in the XML should be instantiated the following way:
TheForm.SubUnitData = New Form70002SubUnit(3)
You need to instantiate the SubUnitData with an array of Form70002SubUnit
but my code
TheForm.SubUnitData = New Form70002SubUnit(3)
'Dim subunitdata(3) As Form70002SubUnit
TheForm.SubUnitData(0) = NewSubUnit1
TheForm.SubUnitData(1) = NewSubUnit2
TheForm.SubUnitData(2) = NewSubUnit3
TheForm.SubUnitData(3) = NewSubUnit4
Gives me an (too many arguments for sub new) on the form70002Subunit(3)
I set the newsubunits up earlier in the code as follows:
Dim NewSubUnit4 As Form70002SubUnit = New
'Select Case fourth
' Case "06"
NewSubUnit4.Mode = "A"
NewSubUnit4.SubUnitCode = "06"
NewSubUnit4.NumberOfPersons = dr.Item(15).ToString
NewSubUnit4.NumberOfHours = dr.Item(16).ToString
NewSubUnit4.ShortTonCoalProduction = "0"

I have tried every combination of setting this mostly getting an object not
set to reference
Please help

Apr 10 '06 #1
0 1025

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Henk | last post: by
4 posts views Thread by OpticTygre | last post: by
reply views Thread by Navin Mishra | last post: by
7 posts views Thread by John Bailo | last post: by
2 posts views Thread by Jonathan Woods | last post: by
7 posts views Thread by D. Patrick | last post: by
reply views Thread by mihailmihai484 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.