I remember writing an article before, but it seems to be a problem. It should be the number of columns. Here, I will correct myself and record it, because I will always forget it, I used it today, so I quickly sent it...
CodeAs follows:
Scrollable result set 1)Com.microsoft.sqlserver.jdbc.SQLServerException: The requested operation is not supported for a forward-only result set. When TYPE is set to:resultset.type_forward_only (default), the cursor cannot be moved arbitrarily, but
With JDBC (including Oracle jdbc extensions), there is no direct (or standard) method to use ResultSet or RowSet to get the number of rows returned by the query. However, you can use scrollable ResultSet or Cached RowSet with very few lines of code
The result set (ResultSet) is an object returned by the query results in the data, which can be said that the result set is an object that stores the results of the query, but the result set does not only have the function of storage, but also has
The result set (ResultSet) is an object returned by the query results in the data, which can be said that the result set is an object that stores the results of the query, but the result set does not only have the function of storage, but also has
The result set (ResultSet) is an object returned by the query results in the data, which can be said that the result set is an object that stores the results of the query, but the result set does not only have the function of storage, but also has
1. Read and write LOBIn addition to numbers, strings, and dates, many databases can store large objects, samples, or other data. In SQL, a binary large object is called a blob, and a large object of characters is called a clob.To read the LOB, the
When we execute a database query and return a resultset, we need to know the size of this resultset in many cases, that is, its number of rows and number of columns. We know that the number of columns can be easily obtained through resultset.
JDBC does not intuitively provide us with the number of records of the resultset query result. In this case, you cannot blindly call the method that looks like obtaining the number of records without querying the API. For example, getfetchsize ()
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.