In building a recordset for inserting records into our SQL Server database, there is a precedent to do a SELECT in that the WHERE clause would return no rows. This blank recordset will then be filled before committed back to the database. The point of this is to get the column definitions for the client.
Example:
SELECT * From TableA where key_column = 0
While doing a trace on the database, I have noticed that this methods executes two statements:
One that gets the column metadata...
SET FMTONLY ON SELECT * From TableA where key_column = 0 SET FMTONLY OFF
... and then original select we intended.
Considering that we only want the metadata, is there a way to only run the first statement when constructing the Recordset from within VB6?
(I am aware that using an INSERT statement instead of a recordset would be the most efficient.)