Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 103995
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T01:12:43+00:00 2026-05-11T01:12:43+00:00

How can I retuen a Object from a web service: [WebMethod] public DataSet GetVendors(string

  • 0

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);     } 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T01:12:43+00:00Added an answer on May 11, 2026 at 1:12 am

    If I’m interpreting your question properly, populate an object on your end with your information in the DataSet and set your return type to object. Or just return the object you populate as that object.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following web service: [ScriptService] public class Handler : WebService { [WebMethod]
How do I return a collection of objects from a webmethod? And can this
I have a ASP.NET web service decorated with System.Web.Script.Services.ScriptService() so it can return json
I am trying to send an anonymous object over a web service. Is there
My company has a product that will I feel can benefit from a web
I want to send a byte array from a web service to a client
I have a .net web service that takes some xml data. From within the
I have a rather simple web-service which exposes data from sql server. It will
If I upgrade a WCF Web Service from .NET 3.5 to 4.0, making no
So I've been working on fetching data from a web service and using it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.