Re: Dynamically Add a column to a table

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Frank Hickman [MVP] (fhickman_NOSP_at_M_noblesoft.com)
Date: 02/14/05


Date: Mon, 14 Feb 2005 14:49:01 -0500


"Neil B" <NeilB@discussions.microsoft.com> wrote in message
news:5AD43F45-B46D-4E2A-8ACB-1F9FC9FD5F47@microsoft.com...
> I'm developing an app in C++ using VS.net. I've created the database for
> my
> app using MS Access. I query the database using CDataBase and CRecordSet
> classes.
> I need to add a new column to databases that were created using back level
> copies of the program. I've never done this via C++. Could you point me at
> some documentation and sample code. Or give me the class and methods to
> use
> to do this???
>
> Thanks,
> Neil

You cannot do this with CDatabase/CRecordset. You need to use ADO/ADOX.
The MSDN which came with VS.Net has multiple examples of using ADOX.

-- 
============
Frank Hickman
Microsoft MVP
NobleSoft, Inc.
============
Replace the _nosp@m_ with @ to reply.


Relevant Pages

  • Dynamically Add a column to a table
    ... I'm developing an app in C++ using VS.net. ... I query the database using CDataBase and CRecordSet ...
    (microsoft.public.vc.database)
  • Re: Lookup previous records
    ... HI Neil, ... Below is some code from a database that I made, with thanks to others in this ... Dim stLinkCriteria As String ... Set rsc = Me.RecordsetClone ...
    (microsoft.public.access.forms)
  • Re: Multiply Cells on a form
    ... The points Neil has made are excellent ones. ... In database design there are certain principles. ... > The best way to ensure that the calculations are correct is to do them 'on ... There are probably other reasons ...
    (microsoft.public.access.forms)
  • Re: CDatabase object access violation on DLL Exit
    ... APP class a CDatabase object pointer which I create inside ... I am opening the Database using OpenEx, querying the database table, ... DLL), the DLL crashes because of an "Access Violation" that occures ...
    (microsoft.public.vc.language)
  • Re: MSFlexGrid Data
    ... When I deleted all of the records in the database ... Neil ... > I have a FlexGrid that allows a user to select a record depending on a ... > information to appear in the grid I call Grid2.clear and reload the ...
    (microsoft.public.vb.general.discussion)