1using Microsoft.Data.SqlClient;
3using System.Threading.Tasks;
78 public override string[]
DefaultArgumentNames =>
new string[] {
"Host",
"Database",
"UserName",
"Password" };
106 SqlConnection Connection;
112 Connection =
new SqlConnection(ConnectionString);
118 ConnectionString =
"Data Source=" + ConnectionString +
";Initial Catalog=" + Database +
";Integrated Security=true";
119 Connection =
new SqlConnection(ConnectionString);
124 SecureString Password2 =
new SecureString();
126 foreach (
char ch
in Password)
127 Password2.AppendChar(ch);
129 Password2.MakeReadOnly();
130 Connection =
new SqlConnection(ConnectionString,
new SqlCredential(UserName, Password2));
137 Password2 =
new SecureString();
139 foreach (
char ch
in Password)
140 Password2.AppendChar(ch);
142 Password2.MakeReadOnly();
144 ConnectionString =
"Data Source=" + ConnectionString +
";Initial Catalog=" + Database;
145 Connection =
new SqlConnection(ConnectionString,
new SqlCredential(UserName, Password2));
149 await Connection.OpenAsync();
Creates a connection to an external MS SQL database.
ConnectMsSql(ScriptNode ConnectionString, ScriptNode UserName, ScriptNode Password, int Start, int Length, Expression Expression)
Creates a connection to an external MS SQL database.
override bool IsAsynchronous
If the node (or its decendants) include asynchronous evaluation. Asynchronous nodes should be evaluat...
ConnectMsSql(ScriptNode Host, ScriptNode Database, ScriptNode UserName, ScriptNode Password, int Start, int Length, Expression Expression)
Creates a connection to an external MS SQL database.
ConnectMsSql(ScriptNode ConnectionString, int Start, int Length, Expression Expression)
Creates a connection to an external MS SQL database.
override IElement Evaluate(IElement[] Arguments, Variables Variables)
Evaluates the function.
override string FunctionName
Name of the function
override string[] DefaultArgumentNames
Default Argument names
override async Task< IElement > EvaluateAsync(IElement[] Arguments, Variables Variables)
Evaluates the function.
ConnectMsSql(ScriptNode Host, ScriptNode Database, int Start, int Length, Expression Expression)
Creates a connection to an external MS SQL database.
Manages a Microsoft SQL Server connection
Class managing a script expression.
Base class for multivariate funcions.
ScriptNode[] Arguments
Function arguments.
static readonly ArgumentType[] argumentTypes2Scalar
Two scalar parameters.
static readonly ArgumentType[] argumentTypes3Scalar
Three scalar parameters.
static readonly ArgumentType[] argumentTypes1Scalar
One scalar parameter.
static readonly ArgumentType[] argumentTypes4Scalar
Four scalar parameters.
Base class for all nodes in a parsed script tree.
int Length
Length of expression covered by node.
override string ToString()
Expression Expression
Expression of which the node is a part.
int Start
Start position in script expression.
Basic interface for all types of elements.