• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 192
  • Last Modified:

ADO Recordset

How to retrieve a blank record set using ADO from a database. The no of Records should be 0 .the database can be vary (SQL/Access/Oracle/AS400)
1 Solution
I assume that you want to get the field names from the table using this sort of method. To get a blank recordset, the easiest way is to use a where clause that cannot be satisfied by any row in the table:
"Select * From <TableName> Where 1=0"
Should do this.
There are other ways to retrieve the structure of a table from the database, perhaps using the OpenSchema method, this should work equally well on most databases.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now