How to establish MS Access database connection in Visual C++ 4.0 M

I use Visual C++ 4.0.

How to connect the database connection with Microsoft Access?

Thank you very much.

landon (165)
4/29/2008 12:12:01 PM
vc.mfc 33608 articles. 0 followers. Follow

4 Replies

Similar Articles

[PageSpeed] 54

Landon wrote:
> I use Visual C++ 4.0.
> How to connect the database connection with Microsoft Access?
> Thank you very much.


Why are you using Visual C++ 4.0? This must be around 12 years old.

But I would imagine you can use CDataBase and ODBC.

David Wilkinson
Visual C++ MVP
no-reply8010 (1791)
4/29/2008 12:39:41 PM
I think they had CRecordset back then. But I can't remember.

I have a copy of 4.0 at home but I would be afraid to install it. :o)


"Landon" <> wrote in message
>I use Visual C++ 4.0.
> How to connect the database connection with Microsoft Access?
> Thank you very much.

AliR3470 (3235)
4/29/2008 2:43:37 PM
Yeah, what can I say about it, my job related with the old development and my 
company customer still use old system..

Is it difficult to establish the connection? 

Is there any step by step guide available?

Thank you very much..
landon (165)
4/30/2008 5:54:09 AM
Landon wrote:
> Yeah, what can I say about it, my job related with the old development and my 
> company customer still use old system..
> Is it difficult to establish the connection? 
> Is there any step by step guide available?
> Thank you very much..


Well, reading the documentation for CDatabase would be a good start. I seem to 
remember that I learned some of this stuff from Mike Blaszczak's MGC book.

Or maybe look on CodeProject/CodeGuru.

David Wilkinson
Visual C++ MVP
no-reply8010 (1791)
4/30/2008 1:58:35 PM

Similar Artilces:

Hello... Im using outlook 2000...i would like 2 show the UK and USA national holidays...ive tried importing them but they are still not showing. Any tips? Thanks @---}-- Laura..... :) "Do you know where you're going to?" -- Diane Poremsky [MVP - Outlook] Author, Teach Yourself Outlook 2003 in 24 Hours Coauthor, OneNote 2003 for Windows (Visual QuickStart Guide) Need Help with Common Tasks? Outlook Tips: Outlook & Exchange Solutions Center: http://ww...

Access denied error with changing startup services in msconfig
I have experienced a new problem in all 9 computers I manage at work and at home. In the last several weeks, every time I run MSCONFIG and try to change a startup service (Startup tab, check or uncheck a service), I get the error dialog "An Access Denied error was returned while attempting to change a service. You may need to log on using an Administrator account to make the specified changes." The service check box does change however after closing the error message. When I hit "Apply" to close out MSCONFIG, the same error message appears, but the changes go ...

IE 8.0.6 remove as default browser
I'm runuuing IE 8.0.6001. I do not want this as my default browser. When I go to internet options/tools/programs the "make default" button is grayed and I cannot find how to undo making IE my default browser. Any help? thanks. Go to the browser taht you want as the default and click the equivelent of TOOLS>INTERNET OPTIONS>PROGRAMS and set it as the Default Browser, then return to Internet Explorer and go to TOOLS>INTERNET OPTIONS>PROGRAMS and uncheck the box that tells IE to check to see if it is the default. I suppose you could uncheck the checkbox fi...

Send/Receive Problem #4
I am unable to receive any incoming messages, without clicking on "Send/Receive". Also, I am geeting an error message which reads: Synchronizing headers. reported error(0x800CCCF4):An unknown error has occurred. Thank you, Fred Hatcher ...

CRM 3.0 Sales for outlook and message attachment issues
Hi everyone I have noticed a strange issue and need some help. I have 2 users using sales for outlook. They both have the exchange routing rule listed within their outlooks rules. When they receive an email with messages forwarded as attachments they see the message attachments but when they click on them they are blank. When they disable the CRM forwarding rule and I resend the message they can open the attached message and the contents are there. Any help or suggestions on this issue would be most appreciated. ...

Users are asked for Outlook (or MS Communicator) login every morni
We're running Outlook 2007, Communicator 2007, and Exchange 2007. Each morning our XP users are prompted for their domain user credentials to log into Outlook/MS Communicator. We believe it's the integration between Communicator & Outlook, but we're not 100% sure. If a user shuts down both Outlook & MOC at night, then they won't see the login prompt in the morning, even after restarting the apps. If they only shut down either only Outlook or only MOC, then the login prompt will appear. And if both apps are left running overnight, the login will appear in ...

How to get a database out of recovery mode
Hi, I have detached a database, moved the files to another drive and attached the DB again. It appeared in read-only mode, so I tried to change the mode to read-write... but unfortunately it failed When I look in the error log there is a stack dump where some of the info are Location: "logmgr.cpp":5527 Expression: !(minLSN.m_fSeqNo < lfcb->lfcb_fSeqNo) Input Buffer 172 bytes - ALTER DATABASE [PXPX_PLEngine_Frys] SET READ_WRITE WITH ROLLBACK IMMEDIATE After this the database became inaccessable and gave the following reply on various DBCC calls "Databas...

When using Office Outlook 2003 to access my MSN Hotmail Plus emails, I have an intermittent problem with access. I receive a popup that states: "Cannot establish a connection to server. Now working in offline." I have no problem connecting to the Internet with Internet Explorer or Mozilla Firefox. I am presently using Cox Cable Broadband to access the internet. Sometimes it takes two or three attempts to access my MSN Hotmail Plus email account using Office Outlook 2003. I am paying $19.95 a year for this email account. I would complain to MSN/Hotmail. "YNCMSS518...

Running MS Query on an Excel Spreadsheet
Is it possible to run 2007 excel MS Query on an Excel spreadsheet with the same results as if you'd run it on an ODBC table like SQL? I have an export from a data table into an Excel spreadsheet and searching keywords is pretty cumbersome so I was hoping that MS Query might yield a better result. TIA hi the guts of Microsoft Query (MSQ) is ODBC and the language behind it is SQL. it is just conveniently packaged as a MS Wizard ie point and click. can you say the words "recorded macro"? tell us more about this "searching keywords is pretty cumbersome" so that we mi...

Excel / Access User Conference
The 2007 Midwest Excel / Access User Conference will be held on October 24-26 in St. Louis, Missouri. Regular registration will close on September 30th. This event will be featuring Mike Alexander, Damon Longworth, Jon Peltier and Bob Umlas. -- Damon Longworth 2007 Excel / Access User Conference London, England - Tentatively Sept. 2007 St. Louis, Missouri - Oct 24-26, 2007 Follow also sent to poster: Spamming is not permitted in these newsgroups even if it is on topic. -- Arvin Meyer, MCP, MVP http://www.dat...

Outlook blocked access to attacments
Help! How can I fix this? Thanks! See for ways to get the attachments off. For more information on the security features, see If you use OE, hit forward on a message or disable it in tools | options | security. -- Diane Poremsky [MVP - Outlook] Author, Teach Yourself Outlook 2003 in 24 Hours - Outlook Tips: Expert Zone Search for answers: Most rec...

MS Outlook 2003 #2
Can Anyone tell me why can't I save outlook today in summer format Try a new mail profile. --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. Due to the (insert latest virus name here) virus, all mail sent to my personal account will be deleted without reading. After searching and finding no answer, Razmik asked: | Can Anyone tell me why can't I save outlook today in | summer format ...

Fiscal Year in Visual Reports
I am trying to use the Visual Reports Feature to show time phased costs by Resource in the Project Plan I am working with. I have created a template that gives me the fields and time phase that I want. The issue is the fiscal year runs from Oct to Sept and I wish to total by Fiscal Year and not Calendar Year. If this was just an Excel Pivot table, I would use the Group feature in Excel to group the appropriate time frames and create my Fiscal Year Groups. When I try to create my own groups in the Excel template I get an error message saying that 'Pivot table cannot group...

MS Money 2007 has grey border under Vista
For some reason Money has an ugly thick grey border under Vista. Anyone know how to get rid of it? Maximize the application. Yeah. I know you shouldn't have to do that to make Money look like any other application. This is another one of many dumb (imo) features of Money. I cannot, for the life of me, understand why Microsoft allows (encourages?) the people who manage this application to flout all of Microsoft's own rules about user interfaces and integration with the OS. The darned thing just doesn't behave right. If it at least did it's job without all of the quirki...

Auto Filter Macro #4
Greetings, I have created a button on a worksheet with the following code: Sub Macro4() ActiveSheet.ShowAllData End Sub When I have the Autofilter active for a column(s), I just press this button and the filter is taken off. No problems. However if I press the button when the Autofilter is not filtering any of the columns, I get a debug error. How do I tell the computer that if I press the button while the Autofilter is already off, don't do anything? Thanks. Try this: Sub Macro4() On Error Resume Next ActiveSheet.ShowAllData End Sub "Snakeoids" wrote: > Gr...

Display a count of unique records in a query in Access 2007
Hi, I'm not sure if I should be in this group, or Reports, but I'll start here. I have a user who would like to do a count of unique records and display the information in a query, or a report. Here are the basics: She has a list of donors, some of the donors donate more than once to the same cause. What she would like is a list of the number of donors, per cause. But, if the donor ID repeats for the same cause, she does not want that ID counted again. Example: We can get a query to return a count of the records per cause. It is returning a value of "7" for a cause,...

Native XML Support for Non-Managed C++ Code #2
Since XML is becoming so important in main stream programming, is there any possiblity that Microsoft would add native XML support to it's non-managed VC++ 7.1 development environment. It would be nice to have native MFC classes to access and manipulate XML similar to the functionality that is already available in .Net. It is a real pain for C++ programmers to use smart-pointers, VARIANTS, and/or building class wrappers for COM components just to be able to access this core programming functionality. Thanks, Bruce ...

How do I setup basic triggers in SQL? Please help I'm new to trigg
Does anyone have suggestions or template for creating basic triggers in SQL? I am absolute beginer when it comes to triggers, I just understand the basic concept of what a trigger does. My goal is to copy certain fields FROM the SOP10100 (header) & SOP10200 (detail) tables TO a newly created table based on a certain criteria in the SOP tables. How would I do this? Do I need to start by right clicking on both SOP10100 & SOP10200 and go to the option "Manage Triggers" to create the triggers? How would I create the syntax for the trigger? Like when I click on Manage tri...

Diary Entry in Access Form
I am more or less famillar with creating a basic form, with a table and some queries and reports. What I would like some help with is creating a 'project' form where our department projects are kept and updated. The basic stuff is there: project name, start date, completion date, priority, describtion. What I'd like to add is a field that will be used to enter a status. Then when saved the new status or updated status is then added as a diary entry, which I guess would be another field, say appended to the dairy field. It it might look like: Status: Met with client Dairy: 2/...

MS CRM on the web
Dear All, I have a client that want to use the MS CRM Knowledge base section on the Intranet and also on the internet. He wants that his clients access a section of the Knowledge base from the web and the employees access another section from the company intarnet. can i do that? How? Thanks. There are 2 problems with this: 1) There is no way to restrict access to a section of the knowledgebase. 2) This would require that your client purchase a license for each of the clients. Matt Parks MVP - Microsoft CRM ---------------------------------------- ----------------------------------------...

Outlook HTTP access generates blank message
Server: Windows & Exchange 2000 Client: Outlook 2003 We have some users that remotely access their email via the HTTP functionality in Outlook. Doing so is generating completely blank messages in their inbox � no subject, sender or recipient and the headers are totally blank. It seems like these messages usually appear after deleting a normal message from the Inbox. Any ideas what is causing this? TIA! Tony ...

MS vs Ultrasoft
Since Microsoft has added a link to Ultrasoft Money, are they now going to bring the quality and functionality of MS pocket Money up to that of Ultrasoft Money? I've used it for years and recently switched to a pocket PC because I wasn't happy with Palm, but Money for the Pocket PC is really bad compared to Ultrasoft Money and I was using Money 99 and the first version of Ultrasoft Money. Please tell me thats what is taking so long for 2006 to come out. I'd be surprised if there's any new functionality in the 2006 client. -- Michael Gordon MVP "Drummond&quo...

MS Access 2007: Calculated field based on subform:
Hello: As part of a review assignment, I have been tasked with adding a calculated field to a form that will count the number of items listed in the associated subform. The subform is based on the table "tblProduct", and is a subform named "frmProductSubform". The Parent table is named "tblCompany". The tables are related by ProductID, and CustomerID fields. The fields included in the subform are: ProductID, ProductType, Price, and Unit. I am trying to create a calculated field based on the subform that will count the number of line items in th...

Access 2007 on XP: Slow, Glitchy and Maddening
I'm interested in hearing if anyone else is having these kinds of problems running Access 2007 under XP (SP2), on a 2.4GHz Pentium 4having 1GB of RAM and no other applications running:- sluggish behavior on opening objects (e.g., tables, queries)- frequent lengthy "timeouts" when trying to do things like right-click to bring up a context menu, or change the width of a columnin an sproc query (this almost feels like the delay-to-load things you'd notice in Access XP when it was pausing to load a DLL)I had Task Manager open during some of this time, and never saw the Access pro...

Message quantities doesn't match between Outlook Web Access and Exchange Server
Hi. I had some really weird issues yesterday on Exchange and Outlook Web Access. One of our users used Outlook 2002 (with Exchange 2000) to sent e-mail yesterday, and then she checked her e-mail at home through Outlook Web Access. But she found out the number of messages she sent from Outlook with Exchange (on Sent Items folder) doesn't match the number of message she sent on her Outlook Web Access (on Sent Items folder). In other words, Number of messages in Sent Items of Outlook �� Number of message in Sent Items of Outlook Web Access What's the reason and how do I tr...