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 8037015
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T02:47:57+00:00 2026-06-05T02:47:57+00:00

I created(in last stage) a ASP.NET website which requires database communications, So we created

  • 0

I created(in last stage) a ASP.NET website which requires database communications, So we created WCF services to connect to the database. If there is a Select statement those service returns DataTable.

Services are working fine and website also working fine

At the time of API creation i don’t know that windows phone sdk does not support the DataTables.

I read some where that Windows Phone SDK doesn’t support DataTable, i checked in my Visual Studio also there is no class called DataTable in System.Data namespace.

I am new to Windows Phone.

But now we want to create a WINDOWS PHONE APP which also works same as Website, so we want to use the existing API(WCF Service).

is there is any way to accomplish this task. most of the methods return type is DataTable.

we don’t want to create two API’s(means services). What should I do?

How to create a Service which works for both Windows Phone and Website.

we are ready to change the change the API and according to that ready to update Website also?

thanks

  • 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. Editorial Team
    Editorial Team
    2026-06-05T02:47:59+00:00Added an answer on June 5, 2026 at 2:47 am

    Just changed the API to return Stream instead of DataTable

     System.IO.StringWriter reader = new System.IO.StringWriter();
     dt.WriteXml(reader, XmlWriteMode.WriteSchema);//dt is datatable
     return reader;
    

    in website small minor changes, reading the stream and assign it to a datatable

        StringReader xmlReader = new StringReader(stream);
        DataTable dt = new DataTable();
        dt.ReadXml(xmlReader);
    

    Update:

    This approach is not suggestible(this was my first web service application), I suggest to use JSON/XML responses(with returning DTOs) instead of returning DataTable..

    Following links might land you in right direction.

    http://www.codeproject.com/Articles/105273/Create-RESTful-WCF-Service-API-Step-By-Step-Guide
    http://mono.servicestack.net/ServiceStack.Hello/

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

Sidebar

Related Questions

I have a dynamically created table which in the last <td> there is a
For past projects(the last few have been web using asp.net mvc) we created a
I created a pagination for an website file last year, and I've never really
I've created the following SQL query to export order data from the database. SELECT
I am about to re-write a project I created last year. One of the
I have the following code and whichever service is created last works(so my annotations
How do I close (using code) the last created CView in my MDI app.
How can I check if a file has been created in the last x
I created a simple PHP site for a friend last year. I went to
We are using EF 4.2 in an ASP.NET app linked to an Oracle 11

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.