views:

229

answers:

1

I am trying to get subsonic to run work in a webservice I am not sure how to return the data. I only get the word Object in my results when It return anything instead of values. What am I missing?

<WebMethod(Description:="Method to retrieveCptCode subsonic List")> _
Public Function GetSubCptCodes() As CPTCodeCollection

    Dim coll As CPTCodeCollection = New CPTCodeCollection()
    Dim qry As Query = New Query(CPTCode.Schema)
    coll.LoadAndCloseReader(qry.ExecuteReader())
    Return coll

End Function
+2  A: 

There are some drawbacks to be aware of with SubSonic + WebService. I think the most successful approaches have not returned SubSonic objects directly, but rather used something like return coll.ToDataTable().

Mitch explained some of the pitfalls:

http://www.enterpriseetc.com/post/SubSonic-Take-2.aspx

This thread talks about using WCF instead of 'the old web services' model

http://forums.subsonicproject.com/forums/t/542.aspx

ranomore