2using System.Data.OleDb;
3using System.Threading.Tasks;
50 public override string[]
DefaultArgumentNames =>
new string[] {
"ConnectionString",
"UserName",
"Password" };
77 string ConnectionString =
Arguments[0].AssociatedObjectValue?.
ToString() ??
string.Empty;
78 OleDbConnection Connection;
84 Connection =
new OleDbConnection(ConnectionString);
91 ConnectionString = ConnectionString.Trim();
92 if (!ConnectionString.EndsWith(
";"))
93 ConnectionString +=
";";
95 ConnectionString +=
"User Id=" + UserName +
";Password=" + Password +
";";
96 Connection =
new OleDbConnection(ConnectionString);
100 await Connection.OpenAsync();
Creates a connection to an external OLE DB database.
override string FunctionName
Name of the function
override string[] DefaultArgumentNames
Default Argument names
ConnectOleDb(ScriptNode ConnectionString, int Start, int Length, Expression Expression)
Creates a connection to an external OLE DB database.
override IElement Evaluate(IElement[] Arguments, Variables Variables)
Evaluates the function.
override async Task< IElement > EvaluateAsync(IElement[] Arguments, Variables Variables)
Evaluates the function.
ConnectOleDb(ScriptNode ConnectionString, ScriptNode UserName, ScriptNode Password, int Start, int Length, Expression Expression)
Creates a connection to an external OLE DB database.
override bool IsAsynchronous
If the node (or its decendants) include asynchronous evaluation. Asynchronous nodes should be evaluat...
Manages an OLE DB SQL Server connection
Class managing a script expression.
Base class for multivariate funcions.
ScriptNode[] Arguments
Function arguments.
static readonly ArgumentType[] argumentTypes3Scalar
Three scalar parameters.
static readonly ArgumentType[] argumentTypes1Scalar
One scalar parameter.
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.