Re: How do I use ADO in VC++ 6.0 to get the columns names of the table

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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


.



Relevant Pages

  • Re: When printing a document on deskjet an empty page comes out
    ... suggestion perhaps never failed running under Windows, ... After having closed the empty preview I ... I’ve tried Print Selection, Print Active Sheets, Print All, Print 1 to 1, ...
    (microsoft.public.excel.misc)
  • Re: corrupt send msg box
    ... Click on the checkbox and hit Enter. ... >> empty checkbox. ... >> after doing all the other steps in the repair procedure. ... >> Unless, there is a specific suggestion, I'd like to reinstall Outlook ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)
  • Re: corrupt send msg box
    ... > Click on the checkbox and hit Enter. ... >>> empty checkbox. ... >>> after doing all the other steps in the repair procedure. ... >>> Unless, there is a specific suggestion, I'd like to reinstall Outlook ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)
  • Re: Row and Col property of MSHFlexGrid
    ... an empty recordset by ... ' Don't know how to make the grid empty, ... Set grid2.DataSource = oRs ... problem when setting a grid to an empty recordset. ...
    (microsoft.public.vb.controls)
  • Re: Cant see Attachments in OE
    ... the message has a paperclip but there is NO attachment at all - it is empty. ... Your suggestion is valid - but not in this case - I already checked that. ... "Alias" wrote in message ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)