⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 e266. determining if a database supports scrollable result sets.txt

📁 这里面包含了一百多个JAVA源文件
💻 TXT
字号:
A scrollable result set allows the cursor to be moved to any row in the result set. This capability is useful for GUI tools that browse result sets. 
There are two types of scrollable result sets. An insensitive scrollable result set is one where the values captured in the result set never change, even if changes are made to the table from which the data was retrieved. A sensitive scrollable result set is one where the current values in the table are reflected in the result set. So if a change is made to a row in the table, the result set will show the new data when the cursor is moved to that row. 

    try {
        DatabaseMetaData dmd = connection.getMetaData();
        if (dmd.supportsResultSetType(ResultSet.TYPE_SCROLL_INSENSITIVE)) {
            // Insensitive scrollable result sets are supported
        }
        if (dmd.supportsResultSetType(ResultSet.TYPE_SCROLL_SENSITIVE)) {
            // Sensitive scrollable result sets are supported
        }
        if (!dmd.supportsResultSetType(ResultSet.TYPE_SCROLL_INSENSITIVE)
            && !dmd.supportsResultSetType(ResultSet.TYPE_SCROLL_SENSITIVE)) {
            // Updatable result sets are not supported
        }
    } catch (SQLException e) {
    }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -