CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Guest

    How to ADD/DELETE/INSERT & MOVE with OLE DB

    How can I ADD, INSERT, DELETE record or MOVE through Database with OLE DB.


  2. #2
    Guest

    Re: How to ADD/DELETE/INSERT & MOVE with OLE DB

    Hi,
    Use SQL Command


  3. #3
    Join Date
    Apr 1999
    Posts
    13

    Re: How to ADD/DELETE/INSERT & MOVE with OLE DB

    Hello!
    If your problem is "how to use OLE DB" then I can suggest the following:
    1.Open your project and select "Insert|New ATL object" menu item. Studio will ask you if you want to include ATL support to your project.
    2.Select "Data access|Consumer" in the dialog that will appear.
    3.Select data source you wish to use (for example, OLE DB Provider for ODBC drivers), specify database and other parameters. I hope you'll be able to investigate dialogs by yourself, they are not very difficult. Some tips: you can test connection with the database pressing an appropriate button. If test succeeded, everything is OK.
    4.Select type of the query: change|insert|delete.
    5. Studio will generate .h file. This file is quite simple. Look up it's code. The most significant part is class CXXXAccessor and macros XXX_PARAM_MAP, XXX_COLUMN_MAP where XXX is a placeholder for BEGIN or END and also macros DEFINE_COMMAND where SQL command is defined.
    6. Correct file the way you want. It can be significantly decreased...

    I hope it will help.
    Dmitry Barashev.



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured