Class SqlServerDatasourceConnection
- Namespace
- YndigoBlue.Velocity.Data.SqlServer
- Assembly
- YndigoBlue.Velocity.dll
Connection configuration for Microsoft SQL Server databases.
public sealed class SqlServerDatasourceConnection : DatasourceConnection, IDatasourceConnection
- Inheritance
-
SqlServerDatasourceConnection
- Implements
Remarks
Warning
SQL Server database support is not available in the Community Edition of Velocity. It requires the Full Edition.
Default port: 1433
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
}
Properties
- AuthenticationMethod
Gets or sets the authentication method used when UseIntegratedSecurity is
true.
- DatasourceType
Gets the datasource type for SQL Server.
- TrustServerCertificate
Gets or sets whether to trust the server certificate without validation.