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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T15:03:54+00:00 2026-06-18T15:03:54+00:00

In windows phone development I have some data from a MS SQL database. I

  • 0

In windows phone development I have some data from a MS SQL database. I am sending a list from a database but I want to convert it to a string array in the client. But I don’t know how to do.

  • 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-18T15:03:56+00:00Added an answer on June 18, 2026 at 3:03 pm

    In C# if you have the list then you can try this:

    string[] str = lst.ToArray();
    

    C# List has ToArray() inbuilt method.

    Here is a code with an assumption that you may want to connect to SQL Server from C#, get the select statement rows into a list and then convert that list to a string array: (Fill up the ? marks using proper values as per your system/database. Here is MSDN articles: one and two.

     using (SqlConnection CONN = new SqlConnection("server=?;database=?;Integrated Security=?"))  {
          //e.g. new SqlConnection("Data Source=localhost;Integrated Security=SSPI;Initial Catalog=dbname");
     String queryString = "SELECT CustomerID, CompanyName FROM dbo.Customers";
     SqlDataAdapter adapter = New SqlDataAdapter(queryString, CONN);
     DataSet dset = New DataSet(); 
     adapter.Fill(dset, "Customers");
    
         List<string> lst = new List<string>();
         //iterate through Dataset
         foreach(DataRow row in dset.Tables["Customers"].Rows)
         {
           lst.Add(row["CompanyName"].ToString());
         }
         //to string array
         string[] str = lst.ToArray();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the tools installed for windows phone 7 development. But, when I run
I am new to Windows Phone development, especially to WP8. I have some minor
I am new in windows phone development. I really have some doubts, Is WPF
I am creating a windows phone application, which need to store some data in
I have a Windows Phone 7.5/Silverlight app. I have some code that I duplicate
I am newbie to windows phone development. I have created the progress indicator using
I am completely new to windows phone development. Now I have a PC with
I'm new to Windows Phone 7 development. In my First Application I want to
I have doubt in Windows 7 Phone Application Development. I need to acess the
I'm new to Windows Phone development, and currently have a simple form. I'm using

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.