Class SqlServerDatasourceConnection
- Namespace
- YndigoBlue.Velocity.Connections
- Assembly
- YndigoBlue.Velocity.dll
Connection configuration for Microsoft SQL Server databases.
public class SqlServerDatasourceConnection : DatasourceConnection, IDatasourceConnection
- Inheritance
-
SqlServerDatasourceConnection
- Implements
Examples
// Connect to SQL Server with basic authentication
var conn = new SqlServerDatasourceConnection
{
Hostname = "localhost",
Port = 1433,
Database = "mydatabase",
Username = "sa",
Password = "MyP@ssw0rd"
};
using (var m = new Manager(conn))
{
var schema = m.LoadSchema("dbo");
// Perform database operations
}
Remarks
WARNING: SQL Server database support is not available in the Community Edition of Velocity. It requires the Full Edition.
Supports SQL Server 2016 and later versions.
Default port: 1433
Properties
- DatasourceType
Gets the datasource type for SQL Server.
- ReservedSettings
Gets the reserved connection string settings that are handled by named properties.
- TrustServerCertificate
Gets or sets whether to trust the server certificate without validation. Default is true.