Re: How do I use ADO in VC++ 6.0 to get the columns names of the table
- From: "Bob Barrows" <reb01501@xxxxxxxxxxxxxxx>
- Date: Wed, 5 Aug 2009 09:43:33 -0400
Greg wrote:
How do I use ADO in VC++ 6.0 to retrieve the columns name/type of the
table in MS Access? I know the name of the table and table is empty.
In addition to Ralph's suggestion, you can open an empty recordset on
the table (using WHERE 1=2 in the sql query to guarantee that no records
are retrieved - yes, I know you said it's empty now, but it won't always
be empty, will it?) and loop through the Fields collection, inspecting
the properties of each Field object. Those properties include Name,
Type, Precision and NumericScale which, combined, seem to satisfy your
request.
This chart will also be relevant for you:
http://www.carlprothman.net/Technology/DataTypeMapping/tabid/97/Default.aspx
--
HTH,
Bob Barrows
.
- References:
- Prev by Date: Re: How do I use ADO in VC++ 6.0 to get the columns names of the table
- Next by Date: Re: How do I use ADO in VC++ 6.0 to get the columns names of the table
- Previous by thread: Re: How do I use ADO in VC++ 6.0 to get the columns names of the table
- Next by thread: Re: How do I use ADO in VC++ 6.0 to get the columns names of the table
- Index(es):
Relevant Pages
|