Class WMSQLServerDataSource
Data Source Element implementation for SQL Server.
Inheritance
WMSQLServerDataSource
Assembly: WMServer.dll
Syntax
public class WMSQLServerDataSource : WMDataSourceBase, IHasEncryptedValues, IWMDataSource, IWMAsset, IDbEntity, IWMEntity, IWMAssetDirectoryMember, IWMPrincipalOwned, IDisposable, IDocumentedEntity, INamedEntity
Constructors
WMSQLServerDataSource()
Declaration
public WMSQLServerDataSource()
WMSQLServerDataSource(string)
Declaration
public WMSQLServerDataSource(string ID)
Parameters
Type |
Name |
Description |
string |
ID |
|
WMSQLServerDataSource(string, string)
Declaration
public WMSQLServerDataSource(string id = null, string connectionString = null)
Parameters
Methods
Close()
Close the connection and dispose of its internal resources.
Declaration
CommitTransaction(string)
Commit the transaction, if one is active.
Declaration
public override void CommitTransaction(string id)
Parameters
Type |
Name |
Description |
string |
id |
|
Overrides
Connect()
Declaration
public override void Connect()
Overrides
Exceptions
Create(WMDataWriter, bool)
Declaration
public DataTable Create(WMDataWriter writer, bool closeOnExit = true)
Parameters
Returns
Delete(WMDataWriter)
Declaration
public void Delete(WMDataWriter writer)
Parameters
Dispose()
Declaration
public override void Dispose()
Overrides
Exceptions
FromDSType(string)
Declaration
public string FromDSType(string typeName)
Parameters
Type |
Name |
Description |
string |
typeName |
|
Returns
GetCreateSQL(DataTable, bool, string)
Declaration
public string GetCreateSQL(DataTable dt, bool isTemporary = false, string tableName = null)
Parameters
Returns
GetSQLType(DataColumn, DataTable)
Declaration
public string GetSQLType(DataColumn col, DataTable dt)
Parameters
Returns
GetSchema(string)
Declaration
public DataTable GetSchema(string objectName)
Parameters
Type |
Name |
Description |
string |
objectName |
|
Returns
IsNull(object)
Declaration
public static bool IsNull(object val)
Parameters
Type |
Name |
Description |
object |
val |
|
Returns
Open(string)
Open a transaction to the database specified in the connectionString
parameter, or the ConnectionInfo property.
Declaration
public void Open(string connectionString = null)
Parameters
Type |
Name |
Description |
string |
connectionString |
|
OpenTransaction()
Attempt to open a new transaction
Declaration
public override string OpenTransaction()
Returns
Overrides
Read(WMDataReader, ElementValue)
Read writer from the associated writer source as per the specified writer reader.
Declaration
public override ElementValue Read(WMDataReader reader, ElementValue args_elementValue)
Parameters
Returns
Overrides
RollbackTransaction(string)
Roll back the transaction, if one is active.
Declaration
public override void RollbackTransaction(string id)
Parameters
Type |
Name |
Description |
string |
id |
|
Overrides
TestConnection(bool)
Tests whether a connection is currently possible to the database.
Declaration
public void TestConnection(bool closeAndDispose = true)
Parameters
Type |
Name |
Description |
bool |
closeAndDispose |
If set to true, the connection is closed and disposed after the method returns.
|
ToDSType(Type)
Declaration
public string ToDSType(Type t)
Parameters
Type |
Name |
Description |
Type |
t |
|
Returns
ValidateTableName(string)
Modify the table name as necessary to ensure it complies with SQL Server's table naming rules.
Declaration
public static string ValidateTableName(string tableName)
Parameters
Type |
Name |
Description |
string |
tableName |
|
Returns
Write(WMDataWriter, ElementValue)
Declaration
public override ElementValue Write(WMDataWriter writer, ElementValue args)
Parameters
Returns
Overrides
Implements