# SQL Server table Source: [https://docs.virtosoftware.com/docs/virto-calendar-web-part/virto-calendar-10/calendar-configuration/data-sources/sql-server-table/](https://docs.virtosoftware.com/docs/virto-calendar-web-part/virto-calendar-10/calendar-configuration/data-sources/sql-server-table/) Product: Virto Calendar On-Premises Updated: 2026-11-27 ## What it is for and what you need The **SQL Server table** source shows the rows of a table or a view of a Microsoft SQL Server database as events: schedules, orders, requests, any data with a start date. With a key column, events can be created, changed and deleted from the calendar. What you need: - a SQL Server that the SharePoint servers reach over the network (port 1433, or the port of the instance); - a database with a table or view that has a title column and a start date column; - an account with SELECT on the table (and INSERT, UPDATE, DELETE to change events): a SQL Server login, with SQL Server authentication enabled on the server, or the account of the SharePoint application pool (Windows authentication); - to add rows from the calendar, every required column outside the mapping must have a default value or accept an empty value. ## Set it up Open the tab **Data sources** of the settings page, click the icon with a plus and choose **SQL Server table**. The panel has the tabs **General**, **Color code** and **Tooltip**. ![The editor of a SQL Server table data source with the server, the database, the table and its columns](https://img-docs.virtosoftware.com/wp-content/uploads/2026/11/calendar-10-ds-sql-general.png) | Field | Required | What to enter | Default | |---|---|---|---| | **Data source name**, the two colors | Yes | See [The editor of a data source](https://docs.virtosoftware.com/docs/virto-calendar-web-part/virto-calendar-10/calendar-configuration/data-sources/index.md#the-editor-of-a-data-source). | — | | **SQL Server** | Yes | The server or instance: sql01.contoso.com or sql01.contoso.com\INSTANCE; a port after a comma: sql01.contoso.com,1433. | Empty. | | **Database** | Yes | The name of the database. | Empty. | | **Use Windows authentication** | No | Connect as the account of the application pool ("Connect as the SharePoint application pool account, otherwise with the SQL Server login below."). | On. A new source needs an [approved server](https://docs.virtosoftware.com/docs/virto-calendar-web-part/virto-calendar-10/calendar-configuration/data-sources/index.md#windows-authentication-and-approved-servers). | | **Login**, **Password** | When Windows authentication is off | The SQL Server login and its password. | Empty. | | **Connect** | — | Connects and loads the tables and views. On failure, a red bar: "Cannot connect to SQL Server." or a [short reason](https://docs.virtosoftware.com/docs/virto-calendar-web-part/virto-calendar-10/calendar-configuration/data-sources/index.md#when-a-remote-system-fails). | Needed while the source is not saved. | | **Table** | Yes | A table or view as {schema}.{name}, for example dbo.CalendarEvents; views are marked "(view)". | Changing the table clears the chosen columns. | Once a table is chosen, its columns load ("Loading columns..."), shown as {name} ({type}): | Field | Required | What to choose | If not set | |---|---|---|---| | **Title column** | Yes | The column with the title. | **Save** is not available. An empty value gives "(no title)". | | **Key column** | No | A column with a unique value per row. Shown only when the table has no single-column primary key ("The table or view has no primary key: choose a column with unique values."); otherwise the primary key is used and **Title column** says "Rows are identified by the primary key {key}." | Events are read but cannot be added, changed or deleted ("Events of this data source cannot be added, changed or deleted without a key column."). | | **Start date column** | Yes | date, datetime, datetime2, smalldatetime or datetimeoffset. | **Save** is not available. | | **End date column** | No | The same types. | The event lasts until its start. | | **All day column** | No | A bit column. | An event from midnight to midnight is an all-day event. | | **Location column**, **Description column** | No | A text column (char, nchar, varchar, nvarchar, text, ntext). | Not shown and not editable. | | **Dates are stored in UTC** | No | Otherwise the dates are in the time zone of the SharePoint site. | Off. | Optional columns have "(none)" to clear the choice. On **Color code**, **Select field for color coded events** lists the columns and **Reload values** reads up to 50 values; on **Tooltip**, **Tooltip columns** chooses the columns of the tooltip. Before a table is chosen, both say "Connect and select a table on the General tab first." Click **Save**. ## Authentication - **Windows authentication** (default). The account of the SharePoint application pool (for example CONTOSO\svc_sharepoint) needs a login on the SQL Server and permissions on the table. A new source needs the server approved in Central Administration exactly as typed in **SQL Server** (name, instance, port; case does not matter); otherwise **Connect** shows the [approval message](https://docs.virtosoftware.com/docs/virto-calendar-web-part/virto-calendar-10/calendar-configuration/data-sources/index.md#what-the-editor-of-a-data-source-shows). - **A SQL Server login**. Clear **Use Windows authentication** and enter **Login** and **Password**. The SQL Server must allow SQL Server authentication (mixed mode). No approved server is needed. ## What the calendar can do ![A calendar with SQL Server events from a table and a view, with the tooltip of an event with Edit and Delete](https://img-docs.virtosoftware.com/wp-content/uploads/2026/11/calendar-10-view-sql.png) - **Read** the rows whose period overlaps the period shown, up to 5000 rows per source and period. - **Create, change and delete** only with a key column, and when neither the source nor the calendar is read-only. Deleting removes the row for good. A new row is written only to the mapped columns. - **The event panel**: **Subject**, start, end, **All day**, **Location**, **Description**, with **Save**, **Discard** and **Delete**; end, all day, location and description only when their columns are mapped. - **The tooltip**: the title, the dates, **Location**, **Description**, the chosen tooltip columns and **Edit**, **Delete**. - **All-day and multi-day events**: all-day events take whole days without a time zone shift; an end at midnight belongs to the previous day. - **Time zones**: dates are read in the time zone of the site or as UTC (**Dates are stored in UTC**), shown in the time zone of the calendar, and converted back when written. - **Moving events with the mouse** changes the dates in the table, when the source can be written and the calendar allows it. - **Colors** by the source and by the value of the color code column. Not supported: recurring events (a row is one event), attachments, attendees, a category field in the panel. ## Limits and common errors - The connection waits 15 seconds. The column list of a table is cached for 10 minutes, so a change of the table structure reaches the calendar later. - **Connect** and reading: "This address is not allowed." (a refused address such as 169.254.x.x); "No connection to {server}: the connection was refused or timed out."; "Authentication on {server} failed."; "The server {server} reported an error." (for example a wrong port or instance); the [approval message](https://docs.virtosoftware.com/docs/virto-calendar-web-part/virto-calendar-10/calendar-configuration/data-sources/index.md#what-the-editor-of-a-data-source-shows) for Windows authentication to a server that is not approved. - Settings: "SQL Server and database are required."; "SQL Server login is required when Windows authentication is off."; "Password is required. The saved password is kept only while the server and the login are not changed."; "Table is required."; "Title and start date columns are required."; "Table {table} is not found or has no columns the account can read."; "Column {column} is not found in table {table}."; "The event is not found in the database table." - A column that disappeared from the table is listed as "{name} (not found in the table)", and the calendar shows no events of the source until the settings are fixed. Check that the server and the port are reachable, the permissions of the login on the table, that SQL Server authentication is enabled, that the server is approved (Windows authentication), and the column types.