private bool IncludedInWhereClause(DataRow schemaRow) { BdpType dbType = (BdpType)schemaRow["ProviderType"]; if (dbType == BdpType.Array || dbType == BdpType.Blob) { return(false); } if ((bool)schemaRow["IsLong"]) { return(false); } if (!(bool)schemaRow["IsKeyColumn"]) { return(false); } return(true); }
public int SetParameter( short index, short childPos, ParameterDirection paramDir, BdpType dataType, BdpType subType, int maxPrecision, int maxScale, int length, object value, bool isNullable) { try { if (paramDir == ParameterDirection.Input || paramDir == ParameterDirection.InputOutput) { this.SetInputParameter( index, childPos, paramDir, dataType, subType, maxPrecision, maxScale, length, value, isNullable); } } catch (IscException e) { this.lastError = e; } return(this.GetErrorCode()); }
private void SetInputParameter( short index, short childPos, ParameterDirection paramDir, BdpType dataType, BdpType subType, int maxPrecision, int maxScale, int length, object value, bool isNullable) { // Set null flag if (value == null || value == DBNull.Value) { this.statement.Parameters[index].NullFlag = -1; this.statement.Parameters[index].Value = DBNull.Value; } else { this.statement.Parameters[index].NullFlag = 0; // Set parameter value switch (this.statement.Parameters[index].DbDataType) { case DbDataType.Array: if (this.statement.Parameters[index].ArrayHandle == null) { this.statement.Parameters[index].ArrayHandle = this.statement.CreateArray( this.statement.Parameters[index].Relation, this.statement.Parameters[index].Name); } else { this.statement.Parameters[index].ArrayHandle.DB = this.statement.DB; this.statement.Parameters[index].ArrayHandle.Transaction = this.statement.Transaction; } this.statement.Parameters[index].ArrayHandle.Handle = 0; this.statement.Parameters[index].ArrayHandle.Write((System.Array)value); this.statement.Parameters[index].Value = this.statement.Parameters[index].ArrayHandle.Handle; break; case DbDataType.Binary: BlobBase blob = this.statement.CreateBlob(); blob.Write((byte[])value); this.statement.Parameters[index].Value = blob.Id; break; case DbDataType.Text: BlobBase clob = this.statement.CreateBlob(); if (value is char[]) { clob.Write(new String((char[])value)); } else { clob.Write((string)value); } this.statement.Parameters[index].Value = clob.Id; break; default: this.statement.Parameters[index].Value = value; break; } } }
public int SetParameter( short index, short childPos, ParameterDirection paramDir, BdpType dataType, BdpType subType, int maxPrecision, int maxScale, int length, object value, bool isNullable) { try { if (paramDir == ParameterDirection.Input || paramDir == ParameterDirection.InputOutput) { this.SetInputParameter( index, childPos, paramDir, dataType, subType, maxPrecision, maxScale, length, value, isNullable); } } catch (IscException e) { this.lastError = e; } return this.GetErrorCode(); }