Exemple #1
0
        /// <include file='docs/mysqlcommand.xml' path='docs/Prepare2/*'/>
        private void Prepare(int cursorPageSize)
        {
            using (new CommandTimer(Connection, CommandTimeout))
            {
                // if the length of the command text is zero, then just return
                string psSQL = CommandText;
                if (psSQL == null ||
                    psSQL.Trim().Length == 0)
                {
                    return;
                }

                if (CommandType == CommandType.StoredProcedure)
                {
                    statement = new StoredProcedure(this, CommandText);
                }
                else
                {
                    statement = new PreparableStatement(this, CommandText);
                }

                statement.Resolve(true);
                statement.Prepare();
            }
        }
 /// <include file='docs/mysqlcommand.xml' path='docs/Prepare2/*'/>
 private void Prepare(int cursorPageSize)
 {
     using (new CommandTimer(Connection, CommandTimeout))
     {
         // if the length of the command text is zero, then just return
         string psSQL = CommandText;
         if (psSQL == null ||
              psSQL.Trim().Length == 0)
             return;
         statement = new PreparableStatement(this, CommandText);
         statement.Resolve(true);
         statement.Prepare();
     }
 }