public CinarDataAdapter(CinarCommand cinarCommand) { this.SelectCommand = cinarCommand; }
public IDbCommand CreateCommand(string cmdText, IDbTransaction transaction, params object[] parameters) { for (int i = 0; i < parameters.Length; i++) cmdText = cmdText.Replace("{" + i + "}", "@_param" + i); CinarCommand cmd = null; if (transaction != null) cmd = new CinarCommand(cmdText, (CinarConnection)transaction.Connection, (CinarTransaction)transaction); else cmd = new CinarCommand(cmdText, (CinarConnection)this.Connection); for (int i = 0; i < parameters.Length; i++) cmd.Parameters.AddWithValue("@_param" + i, parameters[i]); return cmd; }