MS SQL Server support
Radzen apps can connect to Microsoft SQL Server databases. All you need to do is specify the connection string. Radzen will discover the schema and create an OData service which will expose the tables as OData entities.
- Radzen supports only SQL Server authentication. Windows authentication is not supported.
- The MS SQL server instance should be accessible via TCP. Named pipes or shared memory access is not supported.
- The OData services that Radzen generates requires .NET Core. As a result Radzen will not create a MS SQL data source unless .NET Core is installed.
- Full CRUD is supported except for tables that don’t have a primary key or have multiple primary keys.
- Certain column types are not supported -
This tutorial will show you how to connect to a MS SQL Server database, read, add, update and delete data.
Make sure you have installed .NET Core. Follow the installation instructions.
How to build the application
- Step 1: Create and configure the application
- Step 2: Add the MS SQL Server data source
- Step 3: Automatically generate CRUD pages
Create a new Radzen application by following the first step from the quickstart guide.
In this step we create a data source that connects to a MS SQL Server database.
- Open the application that you created in the previous step for editing.
- Click data to go to the My DataSources screen.
- Click new to add a new data source.
- Select MS SQL as data source type.
- Pick a Name for your data source.
- Enter the MS SQL Server connection info - server, port, database name, user and password.
- Click Next.
- Radzen will connect to the database and create entities for all tables.
- Check the Generate pages for CRUD operations check-box.
- Radzen will open Edit and Add pages by default in dialogs. Uncheck the check-box if you want to have navigation instead.
- Click Finish.
You can now run the application to verify that you have full CRUD support.
Optionally you can data-bind a data grid component manually
- Create a page property bound to the result of an invoke operation. Check the third step from the quickstart guide.
- Drag-and-drop a data grid component from the toolbox. Check the fourth step from the quickstart guide.
- Build and run the application.
If Radzen cannot connect to your SQL Server for some reason check the following troubleshooting instructions.
- Verify you have SQL Server authentication enabled. Radzen does not support Windows authentication at the moment.
- Check if TCP/IP access is enabled.
- If your MSSQL Server is running on a dynamic port the SQL Server Browser service should be enabled and running.
- If you are using a local SQL Express try specifying
localhost\SQLEXPRESSas the server name.