Exemple #1
0
 public CinarDataAdapter(CinarCommand cinarCommand)
 {
     this.SelectCommand = cinarCommand;
 }
Exemple #2
0
        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;
        }