Prepare() public method

public Prepare ( ) : void
return void
Ejemplo n.º 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();
            }
        }
Ejemplo n.º 2
0
        /// <include file='docs/mysqlcommand.xml' path='docs/Prepare2/*'/>
        private void Prepare(int cursorPageSize)
        {
            if (!connection.driver.Version.isAtLeast(5, 0, 0) && cursorPageSize > 0)
            {
                throw new InvalidOperationException("Nested commands are only supported on MySQL 5.0 and later");
            }

            // 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.Prepare();
        }
Ejemplo n.º 3
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;
         statement = new PreparableStatement(this, CommandText);
         statement.Resolve(true);
         statement.Prepare();
     }
 }