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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T09:57:46+00:00 2026-06-15T09:57:46+00:00

Based on this link: http://msdn.microsoft.com/en-us/library/windowsazure/ee336243.aspx I’m trying this code to connect to SQL Azure

  • 0

Based on this link: http://msdn.microsoft.com/en-us/library/windowsazure/ee336243.aspx

I’m trying this code to connect to SQL Azure database and insert a row:

// The values being assigned to the StringBuilder members are set previously/not shown
    SqlConnectionStringBuilder connStringBuilder = new SqlConnectionStringBuilder();
    connStringBuilder.DataSource = dataSource;
    connStringBuilder.InitialCatalog = databaseName;
    connStringBuilder.Encrypt = true;
    connStringBuilder.TrustServerCertificate = false;
    connStringBuilder.UserID = userName;
    connStringBuilder.Password = password;

    using (SqlConnection conn = new SqlConnection(connStringBuilder.ToString()))
    {
        using (SqlCommand command = conn.CreateCommand())
        {
            conn.Open();
            command.CommandText =
                "INSERT INTO T1 (col1, col2) values (1, 'string 1'), (2, 'string 2'), (3, 'string 3')";
            int rowsAdded = command.ExecuteNonQuery();
        }
        conn.Close();
    }

Trying to, that is – SqlConnectionStringBuilder, SqlConnection, and SqlCommand are not recognized/resolvable. Do I need to install a separate ADO.NET package for this to work, or what’s the deal?

UPDATE

By adding System.Data.dll to my project references (on my machine, from
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5), I could get those classes to be recognized/resolved, but still get compile-time errors, namely:

Error 1 The base class or interface ‘System.ComponentModel.Component’ in assembly ‘System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089’ referenced by type ‘System.Data.Common.DbConnection’ could not be resolved c:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\System.Data.dll

and:

Error 2 The base class or interface ‘System.ComponentModel.Component’ in assembly ‘System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089’ referenced by type ‘System.Data.Common.DbCommand’ could not be resolved c:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\System.Data.dll

UPDATE 2

Adding SQL.Data as a reference allowed the various types to be resolved, however a different problem then prevented the app from compiling, namely:

Cannot find type System.SystemException in module mscorlib.dll

Removing SQL.Data from References eliminated that problem.

  • 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-15T09:57:47+00:00Added an answer on June 15, 2026 at 9:57 am

    You’ll need to use (or build) a service interface, you can’t access Windows Azure SQL Database (nee SQL Azure) directly from a Windows 8 store app, and I’d contend you shouldn’t even if you could. Here are two primary reasons why:

    1. SQL Database supports only SQL Server authentication. That means each client device will have the keys to the kingdom in terms of the database login. If that login gets compromised, you have a significant problem on your hands.

    2. Access to SQL Database is managed via a firewall on the server, and only traffic from whitelisted IP addresses is allowed to enter the server. That pretty much means you’d have to open up the firewall completely to ANY IP address 0.0.0.0 to 255.255.255.255 since you won’t know that IP ranges your clients will come in on.

    Check out Windows Azure Mobile Services, it provides a secure RESTful CRUD front-end to a Windows Azure SQL Database. I have a blog post that uses Mobile Services to manage a global leaderboard, which may be of help as an example.

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

Sidebar

Related Questions

I build an app based on this site http://msdn.microsoft.com/en-us/library/dd633661%28v=EXCHG.80%29.aspx appointment.Subject = "Status Meeting"; appointment.Body
Based on this msdn article http://msdn.microsoft.com/en-us/library/jj635153.aspx , in Visual Studio 2012 you need to
I've taken the most basic example of setting up a hosted endpoint ... http://msdn.microsoft.com/en-us/library/ms731758.aspx
I came across this link: http://ofps.oreilly.com/titles/9780596805784/ which seems to suggest web app can be
I have this link: http://www.google.com/maps?cid=0,0,612446611849848549&f=q&source=embed&hl=en&geocode=&q=Универзална+Сала+&sll=,&&ie=UTF8&hq=&hnear=Универзална+Сала+&ll=,&z=15&iwloc=near What I want is to retrieve the Lat Lng
I'm trying to deploy restSQL in my local tomcat installation based on this link.
This question is based on this thread . The code function man() { man
Based on this post link text i came up with a regex for javascript
I'm looking at the Ninject Factory extension at the following link: http://www.planetgeek.ch/2011/12/31/ninject-extensions-factory-introduction/ I'm trying
Am using JSF 1.2 and am trying to implement Captcha as per this link

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.