Schema Informations from OleDbDataReader
The OleDbDataReader Object in ADO.NET provides a stream-based, forward-only, read-only retrieval of query results from the Data Source. It is specifically designed for retrieving data and does not allow for data modification operations.
When the ExecuteReader method is executed in the OleDbCommand Object, it instantiates an OleDb.OleDbDataReader Object, which represents the result set obtained from the execution of the SQL statement.
While an OleDbDataReader is open and active, you have the ability to retrieve schema information about the current result set using the GetSchemaTable method. The GetSchemaTable method returns a DataTable object that is populated with rows and columns containing the schema information for the current result set.
GetSchemaTable | OleDbDataReader
By calling GetSchemaTable on the OleDbDataReader Object, you can obtain valuable metadata about the columns in the result set, such as the column name, data type, size, and other relevant properties. This schema information can be utilized for various purposes, including dynamically generating UI elements, performing data validation, or making decisions based on the structure of the result set.
The DataTable returned by GetSchemaTable contains rows that represent the columns in the result set, with each column containing information about a specific aspect of the column's schema. You can access and analyze this schema information using the methods and properties provided by the DataTable object.Full Source VB.NET
sql = "Your SQL Statement Here like Select * from product"
You have to replace the string with your realtime variables.