I'm having a type mismatch problem when trying to pass a typed dataset to a
web service.
My code is:
CLIENT CODE
I have a dataset schema file called MainData.xsd containing a table called
mytable
'create and fill typed dataset
Dim dsMain As New MainData
Dim con As New SqlConnection("myconnectionstring")
Dim da As New SqlDataAdapter("select * .....", con)
da.Fill(dsMain.mytable)
'pass typed dataset to web service
Dim ws As New localhost.DataTransfer
ws.PassData(dsMain)
WEB SERVICE CODE
The web service also has an identical local file containing the data schema
called MainData.xsd
<WebMethod()> Public function PassData(Value as MainData)
...
End Function
Unfortunately I get an error when I hover over the PassData method that says
'Value of Type MainData cannot be converted to localhost.MainData'.
It is obviously treating the two data types as being different.
If I change the parameter type of the PassData function to type DataSet then
the function can be called OK, but then I lose the type information.
Any ideas anybody?
Thanks
Justin Crossley
Dino Chiesa [Microsoft] - 18 Nov 2004 15:14 GMT
I think I saw that you asked this somewhere else.
try this.
http://msdn.microsoft.com/library/en-us/dnservice/html/service07162002.asp
-D
> I'm having a type mismatch problem when trying to pass a typed dataset to
> a web service.
[quoted text clipped - 38 lines]
>
> Justin Crossley