How Do You Get WebRowSet's Metadata as XML? JDBC

Let’s say that you want to only get the metadata of a WebRowSet object without retrieving any data from the database server. To get only the metadata, you need to send a valid SQL query, which returns only metadata without getting any data; for example, you may send the following SQL query:

select * from ztest where 1 = 0;

We know that this SQL query will not retrieve any data (because the Boolean expression 1 = 0 will be always false), but all of the metadata for the ztest table will be captured.

MySQL Database Setup

Create WebRowSet’s Metadata

Running the Solution for a MySQL Database

As you can observe, the <data> tag is empty:

Running the Solution for an ODBC Database

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd Protection Status

JDBC Topics