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

  • Home
  • SEARCH
  • 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 a ASP.NET web service decorated with System.Web.Script.Services.ScriptService() so it can return json
I have a .net web service that takes some xml data. From within the
I want to send a byte array from a web service to a client
I have a method that can return either a single object or a collection
Can I return it as an object if I am doing a Select OneItem
Background I have made a Web Service in Visual Studio, and I'm trying to
In ASP.net web service if the above isn't specified , what is the response
I am using jQuery to call web service (*.asmx) methods. The web service uses
I am creating a Web Service using ASP.NET C#. I am sending various data
I have the same classes on my server and on my web service. I

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.