private void Initialize(string commandText, DAEConnection connection, DAETransaction transaction) { _commandText = commandText; Connection = connection; _transaction = transaction; _parameters = new DAEParameterCollection(this); _commandType = CommandType.Text; _updatedRowSource = UpdateRowSource.Both; }
public virtual object Clone() { DAEConnection newConnection = new DAEConnection(); newConnection.ConnectionString = _connectionString; newConnection.SetConnectionTimeout(_connectionTimeout); newConnection.Alias = _alias; newConnection.Active = Active; return(newConnection); }
/// <summary> Maps a DAEDbType to an Dataphor Schema.DataType </summary> public static Schema.IDataType DataTypeFromDAEDbType(DAEDbType dAEDbType, DAEConnection connection) { switch (dAEDbType) { case DAEDbType.String: return(connection.ServerProcess.DataTypes.SystemString); case DAEDbType.Boolean: return(connection.ServerProcess.DataTypes.SystemBoolean); case DAEDbType.Byte: return(connection.ServerProcess.DataTypes.SystemByte); case DAEDbType.Short: return(connection.ServerProcess.DataTypes.SystemShort); case DAEDbType.Integer: return(connection.ServerProcess.DataTypes.SystemInteger); case DAEDbType.Long: return(connection.ServerProcess.DataTypes.SystemLong); case DAEDbType.Decimal: return(connection.ServerProcess.DataTypes.SystemDecimal); case DAEDbType.GUID: return(connection.ServerProcess.DataTypes.SystemGuid); case DAEDbType.Money: return(connection.ServerProcess.DataTypes.SystemMoney); #if UseUnsignedIntegers case DAEDbType.PByte: return(AConnection.ServerProcess.DataTypes.SystemPByte); case DAEDbType.PShort: return(AConnection.ServerProcess.DataTypes.SystemPShort); case DAEDbType.PInteger: return(AConnection.ServerProcess.DataTypes.SystemPInteger); case DAEDbType.PLong: return(AConnection.ServerProcess.DataTypes.SystemPLong case DAEDbType.SByte: return AConnection.ServerProcess.DataTypes.SystemSByte); case DAEDbType.UInteger: return(AConnection.ServerProcess.DataTypes.SystemUInteger); case DAEDbType.ULong: return(AConnection.ServerProcess.DataTypes.SystemULong); case DAEDbType.UShort: return(AConnection.ServerProcess.DataTypes.SystemUShort); #endif case DAEDbType.TimeSpan: return(connection.ServerProcess.DataTypes.SystemTimeSpan); case DAEDbType.DateTime: return(connection.ServerProcess.DataTypes.SystemDateTime); case DAEDbType.Raw: return(connection.ServerProcess.DataTypes.SystemBinary); default: return(connection.ServerProcess.DataTypes.SystemBinary); } }
internal DAETransaction(DAEConnection connection, System.Data.IsolationLevel isolationLevel) { _connection = connection; _isolationLevel = isolationLevel; IsolationLevel localIsolationLevel; switch (_isolationLevel) { case System.Data.IsolationLevel.ReadUncommitted: localIsolationLevel = DAE.IsolationLevel.Browse; break; case System.Data.IsolationLevel.ReadCommitted: localIsolationLevel = DAE.IsolationLevel.CursorStability; break; case System.Data.IsolationLevel.RepeatableRead: case System.Data.IsolationLevel.Serializable: localIsolationLevel = DAE.IsolationLevel.Isolated; break; default: localIsolationLevel = _connection.ServerProcess.ProcessInfo.DefaultIsolationLevel; break; } _connection.ServerProcess.BeginTransaction(localIsolationLevel); }
/// <summary> /// Initializes a new instance of the DAEDataAdapter class with an D4 select statement and a DAEConnection object. /// </summary> /// <param name="selectCommandText">D4 select statement.</param> /// <param name="connection">The DAE connection</param> public DAEDataAdapter(string selectCommandText, DAEConnection connection) { SelectCommand = new DAECommand(selectCommandText, connection); }
public DAECommand(string commandText, DAEConnection connection, DAETransaction transaction) { Initialize(commandText, connection, transaction); }
public DAECommand(string commandText, DAEConnection connection) { Initialize(commandText, connection, null); }
public static object NativeValue(Alphora.Dataphor.DAE.Runtime.Data.DataValue value, DAEConnection connection) { return(value.AsNative); }