聊聊pg jdbc的queryTimeout及next方法

本文主要介绍一下pg jdbc statement的queryTimeout及resultSet的next方法

实例程序

    @Test
    public void testReadTimeout() throws SQLException {
        Connection connection = dataSource.getConnection();
        //https://jdbc.postgresql.org/documentation/head/query.html
        connection.setAutoCommit(false); //NOTE 为了设置fetchSize,必须设置为false

        String sql = "select * from demo_table";
        PreparedStatement pstmt;
        try {
            pstmt = (PreparedStatement)connection.prepareStatement(sql);
            pstmt.setQueryTimeout(1); //NOTE 设置Statement执行完成的超时时间,前提是socket的timeout比这个大
            pstmt.setFetchSize(5000); //NOTE 这样设置为了模拟query timeout的异常
            System.out.println("ps.getQueryTimeout():" + pstmt.getQueryTimeout());
            System.out.println("ps.getFetchSize():" + pstmt.getFetchSize());
            System.out.println("ps.getFetchDirection():" + pstmt.getFetchDirection());
            System.out.println("ps.getMaxFieldSize():" + pstmt.getMaxFieldSize());

            ResultSet rs = pstmt.executeQuery(); //NOTE 设置Statement执行完成的超时时间,前提是socket的timeout比这个大
            //NOTE 这里返回了就代表statement执行完成,默认返回fetchSize的数据
            int col = rs.getMetaData().getColumnCount();
            System.out.println("============================");
            while (rs.next()) { //NOTE 这个的timeout由socket的超时时间设置,oracle.jdbc.ReadTimeout=60000
                for (int i = 1; i <= col; i++) {
                    System.out.print(rs.getObject(i));
                }
                System.out.println("");
            }
            System.out.println("============================");
        } catch (SQLException e) {
            e.printStackTrace();
        } finally {
            //close resources
        }
    }

PgStatement

ostgresql-9.4.1212.jre7-sources.jar!/org/postgresql/jdbc/PgStatement.java

executeInternal()

private void executeInternal(CachedQuery cachedQuery, ParameterList queryParameters, int flags)
      throws SQLException {
    closeForNextExecution();

    // Enable cursor-based resultset if possible.
    if (fetchSize > 0 && !wantsScrollableResultSet() && !connection.getAutoCommit()
        && !wantsHoldableResultSet()) {
      flags |= QueryExecutor.QUERY_FORWARD_CURSOR;
    }

    if (wantsGeneratedKeysOnce || wantsGeneratedKeysAlways) {
      flags |= QueryExecutor.QUERY_BOTH_ROWS_AND_STATUS;

      // If the no results flag is set (from executeUpdate)
      // clear it so we get the generated keys results.
      //
      if ((flags & QueryExecutor.QUERY_NO_RESULTS) != 0) {
        flags &= ~(QueryExecutor.QUERY_NO_RESULTS);
      }
    }

    if (isOneShotQuery(cachedQuery)) {
      flags |= QueryExecutor.QUERY_ONESHOT;
    }
    // Only use named statements after we hit the threshold. Note that only
    // named statements can be transferred in binary format.

    if (connection.getAutoCommit()) {
      flags |= QueryExecutor.QUERY_SUPPRESS_BEGIN;
    }

    // updateable result sets do not yet support binary updates
    if (concurrency != ResultSet.CONCUR_READ_ONLY) {
      flags |= QueryExecutor.QUERY_NO_BINARY_TRANSFER;
    }

    Query queryToExecute = cachedQuery.query;

    if (queryToExecute.isEmpty()) {
      flags |= QueryExecutor.QUERY_SUPPRESS_BEGIN;
    }

    if (!queryToExecute.isStatementDescribed() && forceBinaryTransfers
        && (flags & QueryExecutor.QUERY_EXECUTE_AS_SIMPLE) == 0) {
      // Simple 'Q' execution does not need to know parameter types
      // When binaryTransfer is forced, then we need to know resulting parameter and column types,
      // thus sending a describe request.
      int flags2 = flags | QueryExecutor.QUERY_DESCRIBE_ONLY;
      StatementResultHandler handler2 = new StatementResultHandler();
      connection.getQueryExecutor().execute(queryToExecute, queryParameters, handler2, 0, 0,
          flags2);
      ResultWrapper result2 = handler2.getResults();
      if (result2 != null) {
        result2.getResultSet().close();
      }
    }

    StatementResultHandler handler = new StatementResultHandler();
    result = null;
    try {
      startTimer();
      connection.getQueryExecutor().execute(queryToExecute, queryParameters, handler, maxrows,
          fetchSize, flags);
    } finally {
      killTimerTask();
    }
    result = firstUnclosedResult = handler.getResults();

    if (wantsGeneratedKeysOnce || wantsGeneratedKeysAlways) {
      generatedKeys = result;
      result = result.getNext();

      if (wantsGeneratedKeysOnce) {
        wantsGeneratedKeysOnce = false;
      }
    }

  }
注意,这里在执行前后分别调用了startTimer()和killTimerTask()

startTimer()

private void startTimer() {
    /*
     * there shouldn't be any previous timer active, but better safe than sorry.
     */
    cleanupTimer();

    STATE_UPDATER.set(this, StatementCancelState.IN_QUERY);

    if (timeout == 0) {
      return;
    }

    TimerTask cancelTask = new TimerTask() {
      public void run() {
        try {
          if (!CANCEL_TIMER_UPDATER.compareAndSet(PgStatement.this, this, null)) {
            // Nothing to do here, statement has already finished and cleared
            // cancelTimerTask reference
            return;
          }
          PgStatement.this.cancel();
        } catch (SQLException e) {
        }
      }
    };

    CANCEL_TIMER_UPDATER.set(this, cancelTask);
    connection.addTimerTask(cancelTask, timeout);
  }
  • startTimer调用了cleanupTimer()
  • cancelTask调用的是PgStatement.this.cancel()
  • 最后调用connection.addTimerTask添加定时任务

cleanupTimer()

/**
   * Clears {@link #cancelTimerTask} if any. Returns true if and only if "cancel" timer task would
   * never invoke {@link #cancel()}.
   */
  private boolean cleanupTimer() {
    TimerTask timerTask = CANCEL_TIMER_UPDATER.get(this);
    if (timerTask == null) {
      // If timeout is zero, then timer task did not exist, so we safely report "all clear"
      return timeout == 0;
    }
    if (!CANCEL_TIMER_UPDATER.compareAndSet(this, timerTask, null)) {
      // Failed to update reference -> timer has just fired, so we must wait for the query state to
      // become "cancelling".
      return false;
    }
    timerTask.cancel();
    connection.purgeTimerTasks();
    // All clear
    return true;
  }
注意这里更新statement状态之后,调用task的cancel,以及connection.purgeTimerTasks()

cancel()

public void cancel() throws SQLException {
    if (!STATE_UPDATER.compareAndSet(this, StatementCancelState.IN_QUERY, StatementCancelState.CANCELING)) {
      // Not in query, there's nothing to cancel
      return;
    }
    try {
      // Synchronize on connection to avoid spinning in killTimerTask
      synchronized (connection) {
        connection.cancelQuery();
      }
    } finally {
      STATE_UPDATER.set(this, StatementCancelState.CANCELLED);
      synchronized (connection) {
        connection.notifyAll(); // wake-up killTimerTask
      }
    }
  }
executeQuery超时了则直接调用connection.cancelQuery()
  public void cancelQuery() throws SQLException {
    checkClosed();
    queryExecutor.sendQueryCancel();
  }

postgresql-9.4.1212.jre7-sources.jar!/org/postgresql/core/QueryExecutorBase.java

public void sendQueryCancel() throws SQLException {
    if (cancelPid <= 0) {
      return;
    }

    PGStream cancelStream = null;

    // Now we need to construct and send a cancel packet
    try {
      if (logger.logDebug()) {
        logger.debug(" FE=> CancelRequest(pid=" + cancelPid + ",ckey=" + cancelKey + ")");
      }

      cancelStream =
          new PGStream(pgStream.getSocketFactory(), pgStream.getHostSpec(), cancelSignalTimeout);
      if (cancelSignalTimeout > 0) {
        cancelStream.getSocket().setSoTimeout(cancelSignalTimeout);
      }
      cancelStream.sendInteger4(16);
      cancelStream.sendInteger2(1234);
      cancelStream.sendInteger2(5678);
      cancelStream.sendInteger4(cancelPid);
      cancelStream.sendInteger4(cancelKey);
      cancelStream.flush();
      cancelStream.receiveEOF();
    } catch (IOException e) {
      // Safe to ignore.
      if (logger.logDebug()) {
        logger.debug("Ignoring exception on cancel request:", e);
      }
    } finally {
      if (cancelStream != null) {
        try {
          cancelStream.close();
        } catch (IOException e) {
          // Ignored.
        }
      }
    }
  }
向数据库server发送cancel指令

killTimerTask()

private void killTimerTask() {
    boolean timerTaskIsClear = cleanupTimer();
    // The order is important here: in case we need to wait for the cancel task, the state must be
    // kept StatementCancelState.IN_QUERY, so cancelTask would be able to cancel the query.
    // It is believed that this case is very rare, so "additional cancel and wait below" would not
    // harm it.
    if (timerTaskIsClear && STATE_UPDATER.compareAndSet(this, StatementCancelState.IN_QUERY, StatementCancelState.IDLE)) {
      return;
    }

    // Being here means someone managed to call .cancel() and our connection did not receive
    // "timeout error"
    // We wait till state becomes "cancelled"
    boolean interrupted = false;
    while (!STATE_UPDATER.compareAndSet(this, StatementCancelState.CANCELLED, StatementCancelState.IDLE)) {
      synchronized (connection) {
        try {
          // Note: wait timeout here is irrelevant since synchronized(connection) would block until
          // .cancel finishes
          connection.wait(10);
        } catch (InterruptedException e) { // NOSONAR
          // Either re-interrupt this method or rethrow the "InterruptedException"
          interrupted = true;
        }
      }
    }
    if (interrupted) {
      Thread.currentThread().interrupt();
    }
  }
这里先调用cleanupTimer,然后更新statement的状态

PgConnection

postgresql-9.4.1212.jre7-sources.jar!/org/postgresql/jdbc/PgConnection.java

getTimer()

private synchronized Timer getTimer() {
    if (cancelTimer == null) {
      cancelTimer = Driver.getSharedTimer().getTimer();
    }
    return cancelTimer;
  }
这里创建或获取一个timer

addTimerTask()

  public void addTimerTask(TimerTask timerTask, long milliSeconds) {
    Timer timer = getTimer();
    timer.schedule(timerTask, milliSeconds);
  }
这个添加timerTask就是直接调度了

purgeTimerTasks()

postgresql-9.4.1212.jre7-sources.jar!/org/postgresql/jdbc/PgConnection.java

public void purgeTimerTasks() {
    Timer timer = cancelTimer;
    if (timer != null) {
      timer.purge();
    }
  }
在cleanupTimer中被调用,用来清理已经被cancel掉的timer task

PgResultSet

postgresql-9.4.1212.jre7-sources.jar!/org/postgresql/jdbc/PgResultSet.java

next()

public boolean next() throws SQLException {
    checkClosed();

    if (onInsertRow) {
      throw new PSQLException(GT.tr("Can''t use relative move methods while on the insert row."),
          PSQLState.INVALID_CURSOR_STATE);
    }

    if (current_row + 1 >= rows.size()) {
      if (cursor == null || (maxRows > 0 && row_offset + rows.size() >= maxRows)) {
        current_row = rows.size();
        this_row = null;
        rowBuffer = null;
        return false; // End of the resultset.
      }

      // Ask for some more data.
      row_offset += rows.size(); // We are discarding some data.

      int fetchRows = fetchSize;
      if (maxRows != 0) {
        if (fetchRows == 0 || row_offset + fetchRows > maxRows) {
          // Fetch would exceed maxRows, limit it.
          fetchRows = maxRows - row_offset;
        }
      }

      // Execute the fetch and update this resultset.
      connection.getQueryExecutor().fetch(cursor, new CursorResultHandler(), fetchRows);

      current_row = 0;

      // Test the new rows array.
      if (rows.isEmpty()) {
        this_row = null;
        rowBuffer = null;
        return false;
      }
    } else {
      current_row++;
    }

    initRowBuffer();
    return true;
  }
这里的fetch没有像executeQuery那样加timer

postgresql-9.4.1212.jre7-sources.jar!/org/postgresql/core/v3/QueryExecutorImpl.java

public synchronized void fetch(ResultCursor cursor, ResultHandler handler, int fetchSize)
      throws SQLException {
    waitOnLock();
    final Portal portal = (Portal) cursor;

    // Insert a ResultHandler that turns bare command statuses into empty datasets
    // (if the fetch returns no rows, we see just a CommandStatus..)
    final ResultHandler delegateHandler = handler;
    handler = new ResultHandlerDelegate(delegateHandler) {
      public void handleCommandStatus(String status, int updateCount, long insertOID) {
        handleResultRows(portal.getQuery(), null, new ArrayList<byte[][]>(), null);
      }
    };

    // Now actually run it.

    try {
      processDeadParsedQueries();
      processDeadPortals();

      sendExecute(portal.getQuery(), portal, fetchSize);
      sendSync();

      processResults(handler, 0);
      estimatedReceiveBufferBytes = 0;
    } catch (IOException e) {
      abort();
      handler.handleError(
          new PSQLException(GT.tr("An I/O error occurred while sending to the backend."),
              PSQLState.CONNECTION_FAILURE, e));
    }

    handler.handleCompletion();
  }

小结

  • queryTimeout是采用添加timer来控制,如果请求过多,可能会造成timer过多
timeout时间不宜过长,不过正常执行完sql,会调用killTimerTask()方,里头会先cleanupTimer,取消timerTask,然后调用purgeTimerTasks()清理cancel掉的task,避免timeout时间过长导致task堆积最后内存溢出
  • 超时之后会timer task会向数据库server发送cancel query指令
  • 发送完cancel query指令之后,client端的查询按预期应该抛出SQLException(这里头的机制有待深入研究,可能是server端返回timeout error)
  • executeQuery方法默认会拉取fetchSize的数据并返回
  • next()方法根据需要再去fetch,这个fetch方法就没有timer来限制时间了,但是最底层应该是受socketTimeout限制

doc

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
存取对象变量库结构作为一个功能较完备的Windows软件开发平台,Visual Basic专业版提供了对数据库应用的强大支持。尤其提供了使用数据控件和绑定控制项,使用数据库存取对象变量(Data Access Object Variable),直接调用ODBC 2.0 API接口函数等三种访问数据库方法。对其标准内置的Ms Access数据库,它可以提供不弱于专业数据库软件的支持,可以进行完整的数据库维护、操作及其事务处理。在VB中,将非Access数据库称为外来数据库。对于FoxPro、dBASE、Paradox等外来数据库。虽然借助VB的Data Manager 能够对这些数据库进行NEW、OPEN、DESIGN、DELETE等操作,但在应用程序的运行状态中并不能从底层真正实现这些功能。本文从使用数据库存取对象变量的方法出发,实现了非Access格式数据库(以FoxPro数据库为例)的建新库、拷贝数据库结构、动态调入等操作,阐述了从编程技巧上弥补VB对这些外来数据库支持不足的可行性 。 一 、 VB数据库的体系结构具体的VB的数据库结构。 VB数据库的核心结构是所谓的MicroSoft JET数据库引擎,JET引擎的作用就像是一块"面 板",在其上可以插入多种ISAM(Indexed Sequential Access Method,即索引顺序存取方 法) 数据驱动程序。JET引擎为Access格式数据库提供了直接的内部(build-in)支持,这就是VB对Access数据库具有丰富支持的真正原因。 VB专业版中提供了FoxPro、dBASE(或 Xbase)、Paradox、Btrieve等数据库的ISAM驱动程序,这就使得VB能支持这些数据库格 式。另外,其他的许多兼容ISAM的驱动程序也可以通过从厂商的售后服务得到。因而从理论上说,VB能支持所有兼容ISAM的数据库格式(前提是只需获得这些数据库的ISAM驱动接口程序)。 由上可见,Ms JET引擎实质上提供了:一个符合ANSI标准的语法分析器;为查询结果集的使用而提供的内存管理功能;同所支持的数据库的外部接口;为应用代码提供的内部接口。实际上,在VB中从一种数据库类型转化为另一种数据库类型几乎不需要或只需要很少的代码修改。而且,尽管dBASE、Paradox本身的DDL (Data Definition Language,即数据定义语言)和DML(Data Manipulation Language,即数据操纵语言)是非结构化查询的,但它们仍然可以使用VB的SQL语句和JET引擎来操纵。 从VB的程序代码的角度来看,ODBC,ISAM驱动程序以及Ms Access数据库的整个外部结构够可以统一为一个一致的编程接口。也即是说,提供给VB应用程序员的记录集对象视图同所使用的数据库格式及类型是相互独立的。即对FoxPro等数据库仍然可以使用众多的数据库存取对象变量,这就为非Access数据库的访问提供了最重要的方法。   二 、使用非Access数据库时的参数设置及配置文件的参数读取如果在VB的程序中使用了数据库的操作,将应用程序生成EXE文件或打包生成安装程序后,则必须提供一个配置 (.INI)文件,在INI文件中可以对不同类型的数据库进行设置。如果找不到这个INI文件, 将会导致不能访问数据库。通常情况下,INI文件的文件名和应用程序的名称相同,所以如果没有指明,VB的程序会在Windows子目录中去找和应用程序同名的INI文件。可以使用VB中的SetDataAccessOptions语句来设置INI文件。 SetDataAccessOptions语句的用法如下:SetDataAccessOptions 1 ,IniFileName其中IniFileName参数指明的是INI文件的带路径的文件名。值得注意的是,当应用程序找不到这个INI文件时,或在调用 OpenDataBase函数时对其Connect参数值没有设定为VB规定的标准值,如对FoxPro 2.5格式设定为了" FoxPro;"(应为" FoxPro 2.5; "),或者没有安装相应的ISAM驱动程序,则此时VB会显示一条错误信息" Not Found Installable ISAM "。通常,INI文件在应用程序分发出去以前已经生成,或者在安装时动态生成,也可以在应用程序中自己生成。 通常这种 INI文件中有" [Options]"、"[ISAM]"、" [Installed ISAMs]"、"[FoxPro ISAM]"、"[dBASE ISAM] " 、" [Paradox ISAM] "等设置段,对于一个完整的应用程序则还应有一个属于应用 程序自己的设置段如" [MyDB]”。可在其中设置DataType、Server、DataBase、 OpenOnStartup、DisplaySQLQueryTimeOut等较为重要的数据库参数,并以此限定应用程序一般的运行环境。 Windows API接口函数在Kernel.exe动态链接库中提供了一个OSWritePrivateProfileString函数,此函数能按Windows下配置文件(.INI)的书写格式写入信息。 在通常情况下,应用程序还需要在运行时读取配置文件内相关项的参数。比如PageTimeOut(页加锁超时时限)、MaxBufferSize(缓冲区大小)、LockRetry(加锁失败时重试次数)等参数,通过对这些参数的读取对应用程序运行环境的设定、潜在错误的捕获等均会有很大的改善。 设此应用程序的配置文件为MyDB.INI,则具体过程如下:Funtion GetINIString$( Byval Fname$ ,Byval szItem$ ,Byval szDeFault$ ) ' 此自定义子函数实现INI 文件内设置段内参数的读取Dim Tmp As String,x As Integer Tmp = String( 2048,32 ) x = OSGetPrivateProfileString(Fname$,szItem$ , szDefault$,Tmp,Len(Tmp) ," MyDB.INI " ) GetINIString = Mid$( Tmp,1,x ) EndFunction以下这些函数的声明可写在模块文件内,且每个函数的声明必须在一行内Declare Function OSGetPrivateProfileString% Lib "Kernel" Alias "GetPrivateProfileString" (ByVal AppName$, ByVal KeyName$, ByVal keydefault$, ByVal ReturnString$, ByVal NumBytes As Integer, ByVal FileName$) Declare Function OSWritePrivateProfileString% Lib "Kernel" Alias "WritePrivateProfileString" (ByVal AppName$, ByVal KeyName$, ByVal keydefault$, ByVal FileName$) Declare Function OSGetWindowsDirectory% Lib "Kernel" Alias "GetWindowsDirectory" (ByVal a$, ByVal b%) Sub Form1_Load( ) Dim st As String Dim x As Integer Dim tmp As String tmp = String$( 255, 32 ) ' INI文件内为各种数据库格式指明已安装的相应ISAM驱动程序x = OSWritePrivateProfileString(" Installable ISAMS", "Paradox 3.X", "PDX110.DLL", "MyDB.INI" ) x = OSWritePrivateProfileString( "Installable ISAMS", "dBASE III", "XBS110.DLL", "MyDB.INI" ) x = OSWritePrivateProfileString( "Installable ISAMS", "dBASE IV", "XBS110.DLL", "MyDB.INI" ) x = OSWritePrivateProfileString( "Installable ISAMS", "FoxPro 2.0", "XBS110.DLL", "MyDB.INI" ) x = OSWritePrivateProfileString( "Installable ISAMS", "FoxPro 2.5", "XBS110.DLL", "MyDB.INI" ) x = OSWritePrivateProfileString( "Installable ISAMS", "Btrieve", "BTRV110.DLL", "MyDB.INI" ) x = OSWritePrivateProfileString( "dBase ISAM", "Deleted", "On", "MyDB.INI" ) ' 指明 INI文件的位置x = OSGetWindowsDirectory( tmp, 255 ) st = Mid$( tmp, 1, x ) SetDataAccessOption 1, st + "\mydb.ini" '获得INI文件一些参数 gwMaxGridRows = Val(GetINIString( " MyDB.INI " ,"MaxRows", "250" )) glQueryTimeout = Val(GetINIString( " MyDB.INI " ,"QueryTimeout", "5" )) glLoginTimeout = Val(GetINIString( " MyDB.INI " ,"LoginTimeout", "20" )) End Sub   三 、数据存取对象变量对外来数据库编程的方法及其实例在VB专业版数据库编程的三种方法中,第二种-使用数据库存取对象变量(DAO)的方法最具有功能强大、灵活的特点。 它能够在程序中存取ODBC 2.0的管理函数;可以控制多种记录集类型:Dynaset,Snapshot 及Table记录集合对象;可以存储过程和查询动作;可以存取数据库集合对象,例如 TableDefs,Fields,Indexes及QueryDefs;具有真正的事物处理能力。因而,这种方法数据库处理的大多数情况都非常适用。 由于VB中的记录集对象与所使用的数据库格式及类型是相互独立的,所以在非Access数据库中也可以使用数据库存取对象变量的方法。因而 对FoxPro等外来数据库而言,使用数据库存取对象变量的方法同样也是一种最佳的选择。 有一点需要注意的是,VB的标准版中仅能使用数据控件(Data Control)对数据库中的记录进行访问,主要的数据库存取对象中也仅有Database、Dynaset对象可通过数据控件的属 性提供,其它的重要对象如TableDef、Field、Index、QueryDef、Snapshot、Table等均不能在VB的标准版中生成,所以使用数据存取对象变量的方法只能用VB 3.0以上的专业版。 (一)、非Access数据库的新建及库结构的修改VB专业版中的数据库存取对象变量可以分为两类,一类用于数据库结构的维护和管理,另一类用于数据的存取。其中表示数据库结构时可以使用下面的对象: DataBase、TableDef、Field、Index,以及三个集合 (Collection): TableDefs、Fields和Indexes 。每一个集合都是由若干个对象组成的,这些数据对象的集合可以完全看作是一个数组,并按数组的方法来调用。一旦数据库对象建立后,就可以用它对数据库的结构进行修改和数据处理。对于非Access数据库,大部分都是对应于一个目 录,所以可以使用VB的MkDir语句先生成一个目录,亦即新建一个数据库。而每一个非 Access数据库文件可看作是此目录下的一个数据表(Table),但实际上它们是互相独立的。 下面是新建一个FoxPro 2.5格式数据库的程序实例。 Sub CreateNew ( ) Dim Db1 As database , Td As TableDefs Dim T1 As New Tabledef , F1 As New Field , F2 As New Field , F3 As New Field Dim Ix1 As New Index Dim Path As String Const DB_TEXT = 10 , DB_INTEGER = 3 ChDir "\" Path$ = InputBox( " 请输入新路径名: ", "输入对话框" ) MkDir Path$ ' 新建一个子目录Set Db1 = OpenDatabase(Path$, True, False, "FoxPro 2.5;") Set Td = Db1.TableDefs T1.Name ="MyDB" '新建一个数据表,数据表名为MyDB F1.Name = "Name" , F1.Type = DB_TEXT , F1.Size = 20 F2.Name = "Class" , F2.Type = DB_TEXT , F2.Size = 20 F3.Name = "Grade" , F3.Type = DB_INTEGER T1.Fields.Append F1 '向数据表中添加这些字段T1.Fields.Append F2。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值