Edit

Share via


Connect to SQL Server from Power Apps overview

There are different ways to connect to data in SQL Server in your Power Apps app, using Power Fx formulas. You can access data directly or use a view or stored procedures to create, update, or delete data in your app.

Prerequisites

To access data directly, you can create a Start with data app for your SQL Server data. This method lets you get a basic, working app that you can modify with views and stored procedures.

  1. Sign in to Power Apps and go to the Apps page.

  2. Select New app > Start with data.

    Screenshot that shows how to create an app by starting with data under the New app menu.

  3. From the Start with data page, choose Connect external data.

  4. Under Choose a data set to start select From SQL.

    If you have an existing SQL Server connection, it loads.

    Note

    If you don't already have a SQL Server connection, you're prompted to create one.

  5. Select your SQL connection.

  6. Enter your Server name and Database name, then choose Connect. Choose a table from the list of tables that appear.

    Screenshot that shows the Create an app page where you can choose a SQL Server connection, including a table.

    Note

    Only one connection is shown at a time. To use a different connection, select the ... overflow menu on your SQL connection, then find a new one or create a new SQL connection.

  7. Select Create app.

Access data

Once your app is connected to SQL Server, you can access data: Access data in SQL Server.

View results

To view the results of your SQL queries, see: View results in SQL Server.