我怎樣才能retuen一個對象從Web服務:返回對象從Webservice的
[的WebMethod] 公共數據集GetVendors(字符串數據庫) { 的SqlConnection sqlConn =新的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);
}