亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? preparedstatement.java

?? jsp數據庫系統
?? JAVA
?? 第 1 頁 / 共 5 頁
字號:
/*
   Copyright (C) 2002 MySQL AB

      This program is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published by
      the Free Software Foundation; either version 2 of the License, or
      (at your option) any later version.

      This program is distributed in the hope that it will be useful,
      but WITHOUT ANY WARRANTY; without even the implied warranty of
      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      GNU General Public License for more details.

      You should have received a copy of the GNU General Public License
      along with this program; if not, write to the Free Software
      Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

 */
package com.mysql.jdbc;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.ObjectOutputStream;
import java.io.Reader;
import java.io.StringReader;
import java.io.UnsupportedEncodingException;

import java.math.BigDecimal;

import java.net.URL;

import java.sql.Array;
import java.sql.Clob;
import java.sql.ParameterMetaData;
import java.sql.Ref;
import java.sql.SQLException;
import java.sql.Time;
import java.sql.Timestamp;
import java.sql.Types;

import java.text.ParsePosition;
import java.text.SimpleDateFormat;

import java.util.ArrayList;
import java.util.Calendar;
import java.util.TimeZone;


/**
 * A SQL Statement is pre-compiled and stored in a PreparedStatement object.
 * This object can then be used to efficiently execute this statement multiple
 * times.
 * 
 * <p>
 * <B>Note:</B> The setXXX methods for setting IN parameter values must specify
 * types that are compatible with the defined SQL type of the input parameter.
 * For instance, if the IN parameter has SQL type Integer, then setInt should
 * be used.
 * </p>
 * 
 * <p>
 * If arbitrary parameter type conversions are required, then the setObject
 * method should be used with a target SQL type.
 * </p>
 *
 * @author Mark Matthews
 * @version $Id: PreparedStatement.java,v 1.27.2.33 2004/02/05 15:56:17 mmatthew Exp $
 *
 * @see java.sql.ResultSet
 * @see java.sql.PreparedStatement
 */
public class PreparedStatement extends com.mysql.jdbc.Statement
    implements java.sql.PreparedStatement {
    private java.sql.DatabaseMetaData dbmd = null;
    private ParseInfo parseInfo;
    private java.sql.ResultSetMetaData pstmtResultMetaData;
    private SimpleDateFormat tsdf = null;
    private String originalSql = null;
    private boolean[] isNull = null;
    private boolean[] isStream = null;
    private InputStream[] parameterStreams = null;
    private byte[][] parameterValues = null;
    private byte[][] staticSqlStrings = null;
    private byte[] streamConvertBuf = new byte[4096];
    private int[] streamLengths = null;
    private boolean hasLimitClause = false;
    private boolean isLoadDataQuery = false;
    private boolean retrieveGeneratedKeys = false;
    private boolean useTrueBoolean = false;
    private char firstCharOfStmt = 0;

    /**
     * Constructor for the PreparedStatement class.
     *
     * @param conn the connection creating this statement
     * @param sql the SQL for this statement
     * @param catalog the catalog/database this statement should be issued
     *        against
     *
     * @throws SQLException if a database error occurs.
     */
    public PreparedStatement(Connection conn, String sql, String catalog)
        throws SQLException {
        super(conn, catalog);

        if (sql == null) {
            throw new SQLException("SQL String can not be NULL", SQLError.SQL_STATE_ILLEGAL_ARGUMENT);
        }

        originalSql = sql;

        this.dbmd = this.connection.getMetaData();

        useTrueBoolean = connection.getIO().versionMeetsMinimum(3, 21, 23);

        this.parseInfo = new ParseInfo(sql, this.connection, this.dbmd,
                this.charEncoding, this.charConverter);

        initializeFromParseInfo();
    }

    /**
     * Creates a new PreparedStatement object.
     *
     * @param conn the connection creating this statement
     * @param sql the SQL for this statement
     * @param catalog the catalog/database this statement should be issued
     *        against
     * @param cachedParseInfo already created parseInfo.
     *
     * @throws SQLException DOCUMENT ME!
     */
    public PreparedStatement(Connection conn, String sql, String catalog,
        ParseInfo cachedParseInfo) throws SQLException {
        super(conn, catalog);

        if (sql == null) {
            throw new SQLException("SQL String can not be NULL", SQLError.SQL_STATE_ILLEGAL_ARGUMENT);
        }

        originalSql = sql;

        this.dbmd = this.connection.getMetaData();

        useTrueBoolean = connection.getIO().versionMeetsMinimum(3, 21, 23);

        this.parseInfo = cachedParseInfo;

        initializeFromParseInfo();
    }

    /**
     * JDBC 2.0 Set an Array parameter.
     *
     * @param i the first parameter is 1, the second is 2, ...
     * @param x an object representing an SQL array
     *
     * @throws SQLException because this method is not implemented.
     * @throws NotImplemented DOCUMENT ME!
     */
    public void setArray(int i, Array x) throws SQLException {
        throw new NotImplemented();
    }

    /**
     * When a very large ASCII value is input to a LONGVARCHAR parameter, it
     * may be more practical to send it via a java.io.InputStream. JDBC will
     * read the data from the stream as needed, until it reaches end-of-file.
     * The JDBC driver will do any necessary conversion from ASCII to the
     * database char format.
     * 
     * <P>
     * <B>Note:</B> This stream object can either be a standard Java stream
     * object or your own subclass that implements the standard interface.
     * </p>
     *
     * @param parameterIndex the first parameter is 1...
     * @param x the parameter value
     * @param length the number of bytes in the stream
     *
     * @exception SQLException if a database access error occurs
     */
    public synchronized void setAsciiStream(int parameterIndex, InputStream x,
        int length) throws SQLException {
        if (x == null) {
            setNull(parameterIndex, java.sql.Types.VARCHAR);
        } else {
            setBinaryStream(parameterIndex, x, length);
        }
    }

    /**
     * Set a parameter to a java.math.BigDecimal value.  The driver converts
     * this to a SQL NUMERIC value when it sends it to the database.
     *
     * @param parameterIndex the first parameter is 1...
     * @param x the parameter value
     *
     * @exception SQLException if a database access error occurs
     */
    public void setBigDecimal(int parameterIndex, BigDecimal x)
        throws SQLException {
        if (x == null) {
            setNull(parameterIndex, java.sql.Types.DECIMAL);
        } else {
            setInternal(parameterIndex, fixDecimalExponent(x.toString()));
        }
    }

    /**
     * When a very large binary value is input to a LONGVARBINARY parameter, it
     * may be more practical to send it via a java.io.InputStream. JDBC will
     * read the data from the stream as needed, until it reaches end-of-file.
     * 
     * <P>
     * <B>Note:</B> This stream object can either be a standard Java stream
     * object or your own subclass that implements the standard interface.
     * </p>
     *
     * @param parameterIndex the first parameter is 1...
     * @param x the parameter value
     * @param length the number of bytes to read from the stream (ignored)
     *
     * @throws SQLException if a database access error occurs
     * @throws java.sql.SQLException DOCUMENT ME!
     */
    public void setBinaryStream(int parameterIndex, InputStream x, int length)
        throws SQLException {
        if (x == null) {
            setNull(parameterIndex, java.sql.Types.BINARY);
        } else {
            if ((parameterIndex < 1)
                    || (parameterIndex > staticSqlStrings.length)) {
                throw new java.sql.SQLException(
                    "Parameter index out of range (" + parameterIndex + " > "
                    + staticSqlStrings.length + ")", SQLError.SQL_STATE_ILLEGAL_ARGUMENT);
            }

            parameterStreams[parameterIndex - 1] = x;
            isStream[parameterIndex - 1] = true;
            streamLengths[parameterIndex - 1] = length;
            isNull[parameterIndex - 1] = false;
        }
    }

    /**
     * JDBC 2.0 Set a BLOB parameter.
     *
     * @param i the first parameter is 1, the second is 2, ...
     * @param x an object representing a BLOB
     *
     * @throws SQLException if a database error occurs
     */
    public void setBlob(int i, java.sql.Blob x) throws SQLException {
        setBinaryStream(i, x.getBinaryStream(), (int) x.length());
    }

    /**
     * Set a parameter to a Java boolean value.  The driver converts this to a
     * SQL BIT value when it sends it to the database.
     *
     * @param parameterIndex the first parameter is 1...
     * @param x the parameter value
     *
     * @throws SQLException if a database access error occurs
     */
    public void setBoolean(int parameterIndex, boolean x)
        throws SQLException {
        if (useTrueBoolean) {
            setInternal(parameterIndex, x ? "'1'" : "'0'");
        } else {
            setInternal(parameterIndex, x ? "'t'" : "'f'");
        }
    }

    /**
     * Set a parameter to a Java byte value.  The driver converts this to a SQL
     * TINYINT value when it sends it to the database.
     *
     * @param parameterIndex the first parameter is 1...
     * @param x the parameter value
     *
     * @exception SQLException if a database access error occurs
     */
    public void setByte(int parameterIndex, byte x) throws SQLException {
        setInternal(parameterIndex, String.valueOf(x));
    }

    /**
     * Set a parameter to a Java array of bytes.  The driver converts this to a
     * SQL VARBINARY or LONGVARBINARY (depending on the argument's size
     * relative to the driver's limits on VARBINARYs) when it sends it to the
     * database.
     *
     * @param parameterIndex the first parameter is 1...
     * @param x the parameter value
     *
     * @exception SQLException if a database access error occurs
     */
    public void setBytes(int parameterIndex, byte[] x)
        throws SQLException {
        if (x == null) {
            setNull(parameterIndex, java.sql.Types.BINARY);
        } else {
            // escape them
            int numBytes = x.length;

            ByteArrayOutputStream bOut = new ByteArrayOutputStream(numBytes);

            bOut.write('\'');

            for (int i = 0; i < numBytes; ++i) {
                byte b = x[i];

                switch (b) {
                case 0: /* Must be escaped for 'mysql' */
                    bOut.write('\\');
                    bOut.write('0');

                    break;

                case '\n': /* Must be escaped for logs */
                    bOut.write('\\');
                    bOut.write('n');

                    break;

                case '\r':
                    bOut.write('\\');
                    bOut.write('r');

                    break;

                case '\\':
                    bOut.write('\\');
                    bOut.write('\\');

                    break;

                case '\'':
                    bOut.write('\\');
                    bOut.write('\'');

                    break;

                case '"': /* Better safe than sorry */
                    bOut.write('\\');
                    bOut.write('"');

                    break;

                case '\032': /* This gives problems on Win32 */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
秋霞国产午夜精品免费视频| 一区二区久久久久久| 91美女福利视频| 久久激五月天综合精品| 亚洲免费大片在线观看| 精品久久人人做人人爽| 欧美专区亚洲专区| 国产精品一区二区黑丝| 五月综合激情网| 一区免费观看视频| 久久精品视频在线免费观看| 欧美色男人天堂| 99久久免费国产| 久久成人av少妇免费| 亚洲综合无码一区二区| 中文字幕在线不卡视频| 久久久91精品国产一区二区三区| 欧美日韩一区二区在线观看| av福利精品导航| 国产乱码精品一区二区三区忘忧草| 亚洲综合免费观看高清在线观看| 中文字幕中文字幕一区| 精品国产乱码久久久久久牛牛 | 欧美精品v日韩精品v韩国精品v| 99久久婷婷国产| 日本精品一级二级| 国产精品一卡二卡在线观看| 日韩av在线播放中文字幕| 亚洲一级片在线观看| 日韩美女精品在线| 亚洲欧洲精品一区二区三区不卡| 国产欧美精品一区aⅴ影院| 精品sm捆绑视频| 日韩美女天天操| 日韩女优毛片在线| 日韩欧美国产小视频| 欧美一区二区三区播放老司机| 欧美日韩国产综合一区二区| 色成人在线视频| 日本乱人伦aⅴ精品| 91久久精品一区二区二区| 色拍拍在线精品视频8848| 色94色欧美sute亚洲线路二| 色乱码一区二区三区88| 在线观看91精品国产入口| 欧美天堂一区二区三区| 欧美三级午夜理伦三级中视频| 欧美在线视频你懂得| 欧美在线免费观看亚洲| 欧美性感一区二区三区| 欧美日韩不卡一区| 91麻豆精品国产| 精品国精品国产| 久久人人97超碰com| 国产欧美日韩麻豆91| 国产精品久久福利| 亚洲精品中文字幕在线观看| 亚洲成人免费电影| 久久99九九99精品| 国产凹凸在线观看一区二区| 北岛玲一区二区三区四区| 色综合久久中文字幕| 欧美亚洲动漫精品| 欧美精品一二三区| 久久久91精品国产一区二区精品 | 一区二区成人在线视频| 水蜜桃久久夜色精品一区的特点 | 豆国产96在线|亚洲| 91久久久免费一区二区| 欧美成人猛片aaaaaaa| 国产精品欧美一区喷水| 精品亚洲成av人在线观看| 国产不卡高清在线观看视频| 色菇凉天天综合网| 26uuu成人网一区二区三区| 亚洲欧洲三级电影| 久久精品国产第一区二区三区| 不卡一二三区首页| 欧美精品九九99久久| 中文字幕电影一区| 亚洲综合网站在线观看| 精品午夜一区二区三区在线观看| 成人午夜电影小说| 在线观看区一区二| 欧美成人激情免费网| 欧美精品第一页| 欧美一级免费观看| 日本一区二区三区国色天香| 亚洲免费观看高清完整版在线观看熊| 亚洲男人的天堂在线观看| 久久福利视频一区二区| 福利视频网站一区二区三区| 色94色欧美sute亚洲线路一久| 9191成人精品久久| 欧美—级在线免费片| 亚洲国产毛片aaaaa无费看| 亚洲成人免费观看| 99久久精品国产麻豆演员表| 欧美日韩成人激情| 国产日产欧美一区| 亚洲在线视频免费观看| 久88久久88久久久| 91麻豆成人久久精品二区三区| 色综合久久九月婷婷色综合| 欧美精品一区二区精品网| 亚洲欧美电影一区二区| 久久国产视频网| 色香蕉久久蜜桃| 欧美精品一区二区久久久| 亚洲精品乱码久久久久| 国产精品99久久久久久似苏梦涵| 欧美在线观看视频在线| 国产亚洲欧美日韩俺去了| 亚洲bt欧美bt精品777| 懂色av中文一区二区三区| 日韩一区二区三区免费观看 | 亚洲一区二区在线免费观看视频| 美女网站色91| 精品国产91九色蝌蚪| 亚洲免费av高清| 激情国产一区二区| 欧美日韩一二三| 久久久精品国产免费观看同学| 六月丁香婷婷色狠狠久久| 在线免费观看日韩欧美| 欧美激情综合五月色丁香小说| 美女视频一区在线观看| 91精品福利视频| 国产日韩亚洲欧美综合| 国产福利91精品一区二区三区| 欧美丰满美乳xxx高潮www| 亚洲欧美日韩电影| 成人免费av在线| 欧美www视频| 久久精品国产99国产精品| 欧美日韩一区视频| 亚洲欧美日韩小说| 99久久精品免费看国产免费软件| 久久亚洲欧美国产精品乐播| 奇米影视7777精品一区二区| 欧美日韩视频一区二区| 亚洲一区二区三区美女| 99久久伊人网影院| 国产精品欧美一区二区三区| 丁香啪啪综合成人亚洲小说| 欧美精品一区二| 日韩vs国产vs欧美| 久久伊99综合婷婷久久伊| 日韩成人一区二区| 3d动漫精品啪啪1区2区免费| 亚洲图片欧美综合| 欧美中文字幕一二三区视频| 午夜av电影一区| 欧美精品在线一区二区| 石原莉奈一区二区三区在线观看| 91在线国产福利| 亚洲18影院在线观看| 在线不卡a资源高清| 视频一区视频二区中文| 7777精品伊人久久久大香线蕉的| 亚洲成人免费av| 欧美日韩在线三区| 极品尤物av久久免费看| 久久综合色综合88| 国产a级毛片一区| 国产精品国产a级| 99riav一区二区三区| 丝袜美腿高跟呻吟高潮一区| 欧美一区中文字幕| 日韩成人av影视| 欧美日韩一区小说| 国产乱一区二区| 精品久久久久久久久久久久久久久| 精品中文字幕一区二区| 日韩精品一区二区三区在线| 韩国av一区二区三区四区| 欧美成人女星排名| 成年人国产精品| 亚洲国产精品久久不卡毛片| 91精品午夜视频| 日韩av一二三| 色婷婷综合久色| 国产精品一区二区91| 日本女优在线视频一区二区| 亚洲免费av高清| 亚洲日本中文字幕区| 国产精品理伦片| 国产精品第五页| 中文字幕亚洲一区二区va在线| 欧美激情在线免费观看| 精品少妇一区二区三区 | 成人激情视频网站| 国产成人免费在线| 日韩和欧美一区二区三区| 午夜影院久久久| 久草热8精品视频在线观看| 国产一区二区主播在线| 国产盗摄一区二区三区| 成人动漫中文字幕| 国产精品一区二区你懂的|