Using OLE DB in MFC Project

Hi,

I have developed an MFC application. I now want to add database 
functionality to it. I have had a look at the various database technologies 
and have decided to try using direct OLE DB rather than ADO as it is faster.

However I have noticed that in tutorials it is recommended to use the 
wizards in an ATL project. 

As i have said before my application has been written in MFC. I was 
wondering how easy it is to add direct OLE DB to my MFC application.

I would appreciate suggesstions on how i can manage this,

Thanks In Advance
Macca
0
macca (52)
12/14/2004 8:13:02 PM
vc.mfc 33608 articles. 0 followers. Follow

0 Replies
638 Views

Similar Articles

[PageSpeed] 44

Reply:

Similar Artilces:

how to add a resource from a different project in to existing one
I created one project with so many dialogs. But now I hav eto go for another project as there is change in userinterface but much of the dialogs will be useful to me. Is there any short cut so that I can use that project resource in to my project. I am in VS 8.0 Pls guide. Thanks If the dialogs can be reused in both projects, you could wrap these in a dll (resource only or a regular MFC dll). Another option would be to cut paste the resources in resource editor. --- Ajay Bhargs wrote: > I created one project with so many dialogs. > But now I hav eto go for another project as there is...

how to use temporary tables in dex
Hi Somebody has one example of how to use temporary tables in dex Cesar Hi Cesar. Define temp tables just as you would define a SQL table in Dex - but with physical name as "temp" without the quotation. I recommend using database type ctree for performance as it would just create a temp file in your directory. From there on, just use the temp table as you would with normal dex table but remember that once you are done with your routine, your temp table will be deleted automatically. Use temp table as a temporary repository for your calculations, reports, etc. ---Darryl Baj...

Question 2:Color cell using conditional formatting
Hi, Using conditional formatting to change color of cell if something is entered works! (thanks Anonnymous!) Now, how woudl I go about to change the color to red if data entered starts with a 1, and change to yellow if if it starts with a letter. I have seen that you can add a 2nd condition in conditional formatting, but I cannot find what formula to use. Or should I use cell value is? Thanks again!! For the 1st condition, use: =LEFT(A1)*1=1 For the 2nd: =OR(AND(CODE(LEFT(A1))>=65,CODE(LEFT(A1))<=90),AND(CODE (LEFT(A1))>=97,CODE(LEFT(A1))<=122)) HTH Jason Atlanta, GA ...

Microsoft Icons for Web Use
I have several Office documents I'm linking to on my web site and I'm looking for where I can download the icons for the Office applications. Anyone? Specifically, I need an icon for MS Word and MS Excel. It was much easier to find the Acrobat icon for use. :( Thump If you have Office you already have access to the icons. Select one of the applications in the MS Office folder then Command+I for Get Info. Click the icon in the Get Info window & Command+C to copy it, Paste to wherever. NOTE: As an FYI, as with all corporate logos & trademarks there are copyright restrictio...

UPDATE using SUM
I have a stored procedure where I am trying to update a temp table in the flow of the sp. I have tried the code below but it gives me an error "Incorrect syntax near the keyword 'GROUP' and I understand the error but don't know how to get around it and still get sums. Can anyone help? Thanks. UPDATE #tempInventoryAnalysis SET [PTDSalesQty] = SUM(CASE WHEN MGB.dbo.tblArHistHeader.InvcDate BETWEEN @StartDate AND @EndDate THEN MGB.dbo.tblArHistDetail.QtyShipSell ELSE 0 END), [YTDSalesQty] = SUM(MGB.dbo.tblArHistDetail.Qt...

Big difference in performance
I wrote a class on which I perform unit-testing before integration in the main development line, the unit-testing and main dev being two separate projects. I wrote a routine which constructs a data structure in the class, which uses CArrays, vectors, and the nth_element routine from STL, with the routine being recursive. Now, in the unit-test project, the routine takes ~3-4 seconds to execute. In the main development code, it takes ~70 seconds to execute. This is measured for the routine itself (no setup or cleanup), same data as input, same computer, and both projects compiled for debug. ...

Use cell value as cell address
Hello everyone. I have a worksheet "Main" of 39,000 rows in which column B contains a number between 1 and 7,500. Column C is an empty column I have added. The second sheet, "Names" in the book contains a single column - A - of 7,500 names. I want to get the value from the second sheet that matches the number column of the first sheet. In other words, if "Main" cell B3 contains 3780, I want to put the value from "Names" cell A3780 into "Main" C3. How do I do this please? Richard --- Message posted from http://www.ExcelForum.com/ Hi tr...

Can't access hotmail using Outlook Connector for MSN
I can't seem to download anything from my hotmail account into Outlook after setting up a link with Outlook Connector for MSN. Anyone have any ideas? ...

Use Money 2002 Files in Money 2008
HI, How can I convert or use my Money 2002 files in Money 2008 Trial. Thanks. -- Smith Assuming that M2002 and M2008 are both from the same geography you just install M2008, navigate to the .mny file and double click on the file name. If M2002 is non-US version, the quick answer is "you don't". :-( -- Regards Bob Peel, Microsoft MVP - Money For unofficial FAQs see http://money.mvps.org/ or http://umpmfaq.info/ I do not respond to any emails that I have not specifically asked for. "Smith" <Smith@discussions.microsoft.com> wrote in message news:A6962F8A...

MAPI Failure message using 2007 word
-- JOHN HASKINS I keep getting this error message when I try to send a document from Word 2007 to my Outlook Email Client, which is my default email setup. I followed the recommended steps that help feature suggested, but that did not work by saving the document then closing and also closing Outlook, which was when word would restart it would start a new MAPI Session. No Go! What much I do. All other applications and software allow me to send to my email client except Office. ...

Make your site eazy to use.
A year or two ago I use to be able to get on CustomerSource very eazily and get information and articles I needed. Now it took me 15 minutes just to sign on. Then I could not find an article about opening a new year or closing 2005. How simple should something that basic be? ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreade...

To auto-fill using names no longer in address
Is there a way to remove the names for the auto fill feature that are no longer in the address book or contact list? If they are selected the properties for the entry states name is no longer valid Address Book entry. Thanks. State your Outlook version and what you mean by "autofill." Outlook has two different functions this could be: autoresolution or autocompletion. -- Russ Valentine [MVP-Outlook] "Ernie C" <anonymous@discussions.microsoft.com> wrote in message news:04e601c4913a$f07a15c0$7d02280a@phx.gbl... > Is there a way to remove the names for the au...

Using Contact's Categories to set message categories
Is there any way to have a rule that sets an incoming message category to the categor(ies) that the sender of the message is assign to in my contacts list? In other words, I have 'George Washington' in my contacts list. George has a category of 'prez' assigned to him. When I get a message from George, I'd like that message to be assigned the category of 'prez' as well. I know I can manually setup a rule to do this for specific contacts, but it would be so much more useful to manage the rule's behavior by setting categories in the contact list. No. Here&...

Use this internet package
--izytvhgodf Content-Type: multipart/related; boundary="zqzdzynieuqqee"; type="multipart/alternative" --zqzdzynieuqqee Content-Type: multipart/alternative; boundary="fezlepmdc" --fezlepmdc Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Microsoft Consumer this is the latest version of security update, the "October 2003, Cumulative Patch" update which fixes all known security vulnerabilities affecting MS Internet Explorer, MS Outlook and MS Outlook Express. Install now to maintain the security of your computer from these vulnerab...

create a report using vba to select the names for the report
Hi, I need to create a report of selected Customers, I have gone as far as creating a string with customer names in it. Whats next? sample = Selected_Customer_Names= [ABC], [test], [New], [A New One] ...... and so on. Is this correct for the report and/or how do i open the report with the above only listed? -- Message posted via http://www.accessmonster.com On Wed, 28 Apr 2010 03:47:34 GMT, "trevorC via AccessMonster.com" <u44860@uwe> wrote: >Hi, >I need to create a report of selected Customers, I have gone as far as >creating a string with ...

can't access all of my back up after using Osirius program
Hi, I have Windows XP with Outlook 2003. I have backed up my massive amount of emails (400MB) using Outlook Backup from Osirius. Having used this program for smaller amounts of emails with no problems before I then placed the backup onto a disc and formatted the drive. After loading XP and Outlook back on I then tried to restore my backup using the same program. But it runs through the restore procedure without any problems and when I open Outlook up again most of the emails are not there. Outlook Backup has restored my deleted items and my sent items and also all of my accounts as th...

Detailed Time Sheet (overtime, comp time, vacation used)
I need to track in time, out time, in time, out time, overtime, vacation totals (received/used), comp received, comp used, and so. I would recommend to write all the headers on row 1, and start entering the data on row 2. Any column that is a calculation, enter a formula (for example, if column E is the difference of column D and C, enter "=D2-C2") and format the cells as you want the data to be presented (date/time, number, etc.) Hope this helps, Miguel. "Robert D. Sandersfeld" wrote: > I need to track in time, out time, in time, out time, overtime, vacation ...

Using IF for conditional formatting?
Need help with displaying blank cells when formulas are inside. The formulas would display a value if the contents of a source cell is filled in. I'm attempting to use in the formula cells(like B2): IF(A2="","",A2*5) If A2 is null, then display blank in B2, else calculate A2 * 5. Is this the best approach to keeping formula cells clear until data is entered? Thanks!!!! Yes -- For everyone's benefit keep the discussion in the newsgroup. Regards, Peo Sjoblom "Barb" <anonymous@discussions.microsoft.com> wrote in message news:fd0201c4...

Getting machine name when connecting to db
We have an application in Access 2000, front end/back end design,10-12 users. I want to save the dates and times they enter and exitfrom the app from their workstations in a table in the back end.How do I get the name of their workstation to save to that table? Theworkstations have names like "sales1", "sales2", "Reception", etc.Paul Fenton Add error handling as required. Place in a module and call functionwhen needed.'example by Donavon Kuhn (Donavon.Kuhn@Nextel.com)Private Const MAX_COMPUTERNAME_LENGTH As Long = 31Private Declare Function GetComputerName L...

Error
I have two investment accounts. Both have the same stock. When I enter the symbol in the second account, I get an Error Message "Symbol in Use." Anyone know why this occurs and how two investment accounts can hold the same stock. When asked for the symbol, don't type it in but use the drop down menu. -- Regards Bob Peel, Microsoft MVP - Money Hints/Tips http://support.microsoft.com/default.aspx?scid=fh;EN-GB;mny UK Wishes/Suggestions mnyukwsh@microsoft.com "Scott" <anonymous@discussions.microsoft.com> wrote in message news:06d701c39540$e8...

Using XmlRootAttribute for deserialization
I've seen this come up before, but in my case, things are a little more complex, and I'm having a tough time figuring out how to set an element name that works. I have a configuration file that is my serialized object (I'm using a customer deserializer to add some more XAML-like capabilities): <AppConfigObject> <RuntimeType:Kernel xmlns:RuntimeType="MyNamespace.DefaultKernel, Kernel"/> </AppConfigObject> public class AppConfigObject { [XmlElement] public Kernel {...} } Problem I have is deserializing the child node <Kernel> because it al...

How do I use text in a cell as a range name in a formula
If cell A1 had the text TEST in it and TEST is the name I have given to a group of cells using the name box what formula can I use to give me the sum of TEST, thats is the sum of the cells in the group called TEST. I understand that I can simply have =SUM(TEST), but I want the formula to refer to Cell A1 to get the name ie =SUM(A1) doesn't work obviously Any help appreciated Thank you In this case, you want to use the INDIRECT function. E.g., =SUM(INDIRECT(A1)) -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Kiwi" &...

Anyone Else Use Database Query to Query Another Sheet in the Same Excel Workbook?
Wow! I tried this out, and it seems to work beautifully. It's odd, though, that I haven't seen this technique mentioned in any of the several Excel references that I've looked at. Basically, I have a workbook with several worksheets...one worksheet contains a large list with all the records. I wanted to set up the other worksheets to have certain functions...I wanted them to use only certain columns from the main list, and to contain only certain records from the main list that met specified conditions. This is the best solution I have found so far - i.e., creating database q...

how to use power point
I am trying to use my power point for the first time and am clueless on how to do it, can you give me instructions on how to use it? "sara benson" wrote: > I am trying to use my power point for the first time > and am clueless That is an understatement. Try posting in a PPt newsgroup. Sara Try a powerpoint news group. Here's a list to all microsoft news groups(with links). http://aumha.org/nntp.htm Gord Dibben Excel MVP On Sun, 11 Dec 2005 20:04:02 -0800, "sara benson" <sara benson@discussions.microsoft.com> wrote: >I am trying to use my power...

Can conditional formatting be used where .....
Can conditional formatting be used where text is included with numbers. Let me explain by example. A1 = flex 358 A2 = B, 358 A3 = R-U, 354 When A2:A3 numbers do not corresponds to A1 number then highlight cell. Therefore A3 in this example should be highlighted. A1:A3 quantities are the result of a formula. You could, for example, use CF/ Formula is: =RIGHT(A2,LEN(A2)-FIND(" ",A2))<>RIGHT(A$1,LEN(A$1)-FIND(" ",A$1)) -- David Biddulph "Gotroots" <Gotroots@discussions.microsoft.com> wrote in message news:A60A2636-0583-4BB9-...