VKinfotek Inc.
  • Us
    About Us
    Contact Us
  • FAQs
  • Ready Software
    Ready ERP ASP Core Software for Azure Cloud
    Ready Web ERP Software
    Ready ASP.Net Azure Software
    Ready C# SQL Server Accounting Software
    Ready ASP.Net MVC and EF Software
First slide
Earn $100/hour in USA! Click Here

Q100. Build a Windows Azure Application that works with SQL Database?

Create a Visual Studio Project - Cloud application

Open Microsoft Visual Studio and from the File menu, choose New and then Project. In the New Project dialog, expand Visual C# in the Installed Templates list and select Cloud. In the Templates list, select Windows Azure Cloud Service. Set the name of the project to “SqlDatabaseTestApp”. Click OK to create the project.

creating a cloud service application

Refer Figure. In the New Windows Azure Project dialog, inside the Roles panel, expand the tab for Visual C#, select ASP.NET Web Role from the list of available roles and click the right button (>) to add an instance of this role to the solution. Click OK to create the Cloud service solution.

Open Default.aspx page in Design View by clicking the Design button which you can find at the bottom of the screen. Drag and drop a GridView control from the Data section of the Toolbox on to the design canvas. The result screen is shown below.

adding a web role to the cloud service

In the Data Source Configuration Wizard, choose a data source type of Database and specify the name to the data source. Click the OK button to display the Configure Data Source dialog.

In the Configure Data Source dialog, click New Connection. Now, you can configure a connection to your SQL Database. In the dialog, choose Microsoft SQL Server (SqlClient) in the Data Source list Then set the Server name to the name of your SQL Database. Next, change the authentication type to ‘Use SQL Server Authentication’ and type the credentials for your SQL Database. Finally, enter SOMDb in the database name drop down list.

connection property dialog

Continue with the Data Source Configuration Wizard and save the connection string to the Application Configuration file. Next, configure the Select statement and then press Test Query and you can see results returned. Click Finish on the configure data source dialog. Press F5 to run the application in the compute emulator.
  • Prev Question
  • Next Question

See More Questions and Answers on - Azure SQL Server

  • Two models of using SQL Server in the cloud
  • Choose between SQL Server in vm and sql database
  • How to access data in Azure sql databas
  • Create and configure SQL database server in the cloud
  • How to configure the SQL database firewall
  • How to connect SQL database instance with SQL Server management studio
  • How to connect to a SQL database with ado.net
  • Connect to Azure sql database using the ado.net entity framework

Back to Master List of 100+ Questions and Answers

People also viewed: cover image of book develop erp software using asp core and deploy to Azure Create your own ERP Software using ASP Core>>
cover image of azure cloud book Create your own Azure SOM Software>>
cover image of asp.net book Create your own ERP Software using ASP .Net and SQL>>
cover image of foundation database programming book Create your own Accounting Software using C# >>
cover image of entity framework book Create your own SOM using Entity Framework MVC >>

  • SITEMAP
  • Terms of use
  • Testimonials

Back to top

Copyright © 2018 - All Rights Reserved - VKInfotek.com