|
-
May 21st, 1999, 06:50 AM
#1
How to ADD/DELETE/INSERT & MOVE with OLE DB
How can I ADD, INSERT, DELETE record or MOVE through Database with OLE DB.
-
May 21st, 1999, 09:00 AM
#2
Re: How to ADD/DELETE/INSERT & MOVE with OLE DB
-
May 21st, 1999, 09:47 AM
#3
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|