How can I retuen a Object from a web service:
[WebMethod] public DataSet GetVendors(string Database) { SqlConnection sqlConn = new SqlConnection();
sqlConn.ConnectionString = GetConnString(Database);
// build query
string strSQL = @" SELECT [No_] AS [VendorNo],
LTRIM([Name]) AS [VendorName]
FROM [********_$Vendor]
WHERE LEN(RTRIM([Name])) > 0 /* avoid blank names */
AND [Vendor Posting Group] = 'VEND'
ORDER BY LTRIM([Name]) ASC; /* LTRIM fixes spaces before name */ ";
SqlDataAdapter da = new SqlDataAdapter(strSQL, sqlConn);
DataSet ds = new DataSet();
da.Fill(ds, "Vendors");
return (ds);
}