i want to pass a parameter as a datarow to the web service
cant it possible dataset we can pass but want ot pass datarow
please help me out i need it urjent

I don't see why not. Try something like this:

<WebMethod()> _
    Public Function PassDataRow(ByVal dr As System.Data.DataRow) As String
        Return dr.Item(0).ToString()
    End Function

I don't see why not. Try something like this:

<WebMethod()> _
    Public Function PassDataRow(ByVal dr As System.Data.DataRow) As String
        Return dr.Item(0).ToString()
    End Function

i tried this but its showing me error

I don't see why not. Try something like this:

<WebMethod()> _
    Public Function PassDataRow(ByVal dr As System.Data.DataRow) As String
        Return dr.Item(0).ToString()
    End Function

=======================

its showing me this error if i passed datarow

Server Error in '/PLEWService' Application.

System.Data.DataRow cannot be serialized because it does not have a parameterless constructor.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: System.Data.DataRow cannot be serialized because it does not have a parameterless constructor.

Source Error:

Microsoft says: XML serialization can only be applied to classes that contain a public default (parameterless) constructor.

So this DataRow needs to be serialized. I think. :(

yes if u get anything about this please help me.... hye thanks for quick reply

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.