C++ / Access Newbie

Hi Folks...

I have a small commercial package written in C++ (targeted to Windows
platforms) that uses its own proprietary database.  We are just starting to
investigate the option of replacing our database with a commercial package,
such as Access or MySQL.  Can anyone recommend informative reading that
provides details on programming C++ with either of these two databases?  At
this stage we have no (any I mean ZERO) experience such programming.  Any
information would be helpful:  recommendations for Access over MySQL (or
vice versa), sources of such comparisons, licensing considerations, ODBC
usage, etc.

TIA,
....mcs


0
meade1 (11)
11/2/2003 10:28:45 PM
vc.mfc 33608 articles. 0 followers. Follow

3 Replies
749 Views

Similar Articles

[PageSpeed] 47

Meade,

I have written a number of applications for several 
clients using VC++ 6.0 that use MS Access and MS SQL 
Server.  I have heard of MySQL but have no experience with 
it.  The information below pertains only to MS Access and 
MS SQL Server.

If there is an Ole DB Provider for MySql, what is said 
about OleDB below will probably apply to MySQL.  
Otherwise, it probably has it's own proprietary package 
for interfacing with MySQL databases.

Your choices of interfaces (of which I am aware) are:
DAO (Data Access Objects) High Level 
ADO (Active Data Objects) High Level
OLE DB (a set if COM interfaces) Low Level.  ADO is an 
OleDB wrapper.

Both ADO and DAO are available in Visual Basic, as well as 
in VC++.  Ole DB is only for C++ apps (Someone who is 
doing OleDB stuff in VB will correct me, I am sure, but I 
still think that you'd have to be crazy to do anything 
serious in VB with the OleDb interfaces).

I wrote my own 'DAO Like' wrapper class for the OleDB 
interfaces.  I use it for both MS Access and MS SQL Server 
Applications.  I did this because I had written a bunch of 
DAO applications and then when OleDB came around a few 
years later and I tried migrating my apps to ADO, I had 
problems with it, no doubt because it was brand new, as 
was OleDB which it intended to 'wrap'.  

Your best bet will probably be to use ADO.  It is the 
latest high level interface created by Microsoft, and it 
supports all data sources for which there exists an OleDB 
provider, such as MS Access, SQL Server, Oracle, Visual 
Foxpro, just to name a few.

However, there is nothing wrong with obtaining the Package 
used with MySQL, if you would prefer not to put all your 
eggs in one Microsoft basket.

MS Access is designed to be a single user desktop 
application.  It may be used as a multi-user database, 
however, it is not recommended for systems with more than 
ten users.  If your system is larger than this, you will 
want to choose a higher-octane database.

Insofar as good books are concerned, none come to mind.  I 
would be happy to answer any questions you may have to 
help you get started.

Please feel free to contact me by email, if you have any 
other questions.

Just curious: Is your current application with its own 
proprietary database principally SQL Language based or is 
it primarily Procedure Based?

Charles Cotton
ccot@pabell.net


0
ccot (2)
11/3/2003 1:11:49 AM
Meade,

Email Address Spelling Correction:

ccot@pacbell.net IS CORRECT

ccot@pabell.net IS NOT
0
ccot (2)
11/3/2003 1:18:00 AM
Thanks for your response, Charles.  That gives us a good starting point in
our investigation.

Our proprietary database is procedure based around the database objects.
Our last major version included a database interface "tier" that is intended
to be updated with appropriate API calls to access a commercial database,
e.g., via DAO, ADO, etc.

Looks good on paper, but reality frequently has a nasty habit of not living
up to expectations!!

Thanks again.

....mcs

"Charles Cotton" <ccot@pacbell.net> wrote in message
news:05e801c3a1a7$75699550$a101280a@phx.gbl...
> Meade,
>
> I have written a number of applications for several
> clients using VC++ 6.0 that use MS Access and MS SQL
> Server.  I have heard of MySQL but have no experience with
> it.  The information below pertains only to MS Access and
> MS SQL Server.
>
> If there is an Ole DB Provider for MySql, what is said
> about OleDB below will probably apply to MySQL.
> Otherwise, it probably has it's own proprietary package
> for interfacing with MySQL databases.
>
> Your choices of interfaces (of which I am aware) are:
> DAO (Data Access Objects) High Level
> ADO (Active Data Objects) High Level
> OLE DB (a set if COM interfaces) Low Level.  ADO is an
> OleDB wrapper.
>
> Both ADO and DAO are available in Visual Basic, as well as
> in VC++.  Ole DB is only for C++ apps (Someone who is
> doing OleDB stuff in VB will correct me, I am sure, but I
> still think that you'd have to be crazy to do anything
> serious in VB with the OleDb interfaces).
>
> I wrote my own 'DAO Like' wrapper class for the OleDB
> interfaces.  I use it for both MS Access and MS SQL Server
> Applications.  I did this because I had written a bunch of
> DAO applications and then when OleDB came around a few
> years later and I tried migrating my apps to ADO, I had
> problems with it, no doubt because it was brand new, as
> was OleDB which it intended to 'wrap'.
>
> Your best bet will probably be to use ADO.  It is the
> latest high level interface created by Microsoft, and it
> supports all data sources for which there exists an OleDB
> provider, such as MS Access, SQL Server, Oracle, Visual
> Foxpro, just to name a few.
>
> However, there is nothing wrong with obtaining the Package
> used with MySQL, if you would prefer not to put all your
> eggs in one Microsoft basket.
>
> MS Access is designed to be a single user desktop
> application.  It may be used as a multi-user database,
> however, it is not recommended for systems with more than
> ten users.  If your system is larger than this, you will
> want to choose a higher-octane database.
>
> Insofar as good books are concerned, none come to mind.  I
> would be happy to answer any questions you may have to
> help you get started.
>
> Please feel free to contact me by email, if you have any
> other questions.
>
> Just curious: Is your current application with its own
> proprietary database principally SQL Language based or is
> it primarily Procedure Based?
>
> Charles Cotton
> ccot@pabell.net
>
>


0
meade1 (11)
11/4/2003 3:19:03 AM
Reply:

Similar Artilces:

Access Denied
My WinXP computer is stuck in a reboot loop from the Advanced Start-up options menu (Safe Mode, Safe Mode with Networking, Last Known Good Config, etc). I removed my hard drive and connected it to another WinXP machine with a USB/IDE adapter kit. When I try to access my User Account, which is password protected, I get an Access Denied pop-up. I want to save my data before reformatting the hard drive. Is there any around this Access Denied problem? Any feedback is greatly appreciated. Thanks! For WinXP Pro try this: "Access is Denied" error message when y...

Probem: the access database grows too fast...
Hello everybody, I have a problem with an access database (access 2003) which grows up. The size after repairing is about 75MB. The Operating system is win 2003 + sp This database contains about 250 tables and 2300 queries. There is no code and no form. Data are used through VB/VBA code for reading needs or for reading/writing/creating. The object used to access the base is DAO v3.6, so, the workspace is on the user workstation. I have the same database on 2 sites and the code executed doesn't have any difference. The problem about the size is present only on one site. On this site, ...

VBA Compile error when converting to Access 2007
I have converted a database from Access 2003 to 2007, but the VBA project will not compile/run. The problem seems to be with the DAO, but when I go into Tools References and add the MS DAO 3.6 object library back in I get an error saying 'Name conflicts with existing module, project, or object library'. The code it falls over on is: Dim MyIndex As Index Set MyIndex = MyTable.CreateIndex("PrimaryKey") With MyIndex .Primary = True 'falls over on this section .Required = True .Unique = True ...

How to build a project in Visual C++.net developed in Visual C++ 6
Hi, I am Nageshwar. I have developed a project in VC++ 6.0 and OpenGL. I have installed VC++.net in my system. When I compile and build the same code in VC++.net environment, I am getting errors. I have used fstream.h to read and write to files. But this header file is showing errors in VC++.net. I have used iostrea.h header. This is also showing erros. I think I need to use a different version of headers. Please suggest me how to recover from these errors. Which header file I have use instead of fstream.h header? etc., Thanks for all who help me.. Awaiting an early response, Nageshwar ...

Restricting access #2
Hi, We have Exchange 2003 Sp2 on windows 2003 Sp1 server. We wanted to give a client access to a public calendar. Is it possible to do this with out giving them an exchange account? If they need an exchange account, is it possible to restrict them to only viewing the calendar and not having them have access to the inbox, contacts etc..? I probably try to set them up with a pop 3 account. Or is there an easier way using OWA? Any thoughts? Thanks. Mitch POP3 does not support public folders. You can have clients access the PFs using OWA - http/https://server.domain.com/public - you woul...

Refreshing Access data in Excel
I have exported the data from an Access query into Excel, but I want the data to refresh whenever the Excel spreadsheet is opened. However, the "Refresh Data" button is greyed out. I've tried to Import Data from the Excel side, but message I get is that I do not have permission to access the Access query data. I do need to use a password to open the Access program and I'm wondering how I can allow any user to open the spreadsheet and see the spreadsheet with the most recent data (which is only refreshed every 24 hours). What do I need to do to resolve this issue? Help!...

How can I access files in 'Personal Folders'?
Question for knowledgeable outlook folks: If I accidentally drag an email into the 'Personal Folders' node on the file tree--not into a subfolder but into Personal Folders it self-- how do I get the email? As far as I can tell it's just gone. Thanks very much for the help. Use Advanced Find on the root of the Personal Folders where you dragged the item - search for all Outlook Items. When found, drag it to the proper folder. --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. All unsolicited mail sent to my personal account will ...

C: Drive documents and setting expansion
Whenever I, Right Click Start then click "Explore", I get an expansion of the my user ID folders. Now, I rarely us "Documents and Settings" and would like to have it expand differently. What do I need to change so that can happen?? Thanks.. Bruce A. Julseth wrote: > Whenever I, Right Click Start then click "Explore", I get an > expansion of the my user ID folders. Now, I rarely us "Documents and > Settings" and would like to have it expand differently. > > What do I need to change so that can happen?? 1. You could ...

newbie question
I am a newbie with a few questions: a) I have a 20 page document that every so often, I want to change a particular page's orientation to landscapw without affecting every page in the documnt. How do I do that. hen I changed page setup, they all changed to landscape - even when I tried setting continous sections b) what is the concept behind Master pages versus templates. Thanx in advance. Robert Robert you cannot have a mix of portrait and landscape orientation in Publisher - any version. What you can do is select all the items on the page, and group them and rotate them 90�. Yo...

Create timeline for 2500 B.C. to 100 B.C.?
Visio only allows me to create timeline for after 1900 AD. Can I use Visio to create a timeline for 2500 BC to 100 BC? Visio's Divided timeline has exactly what I need except I can not enter BC as the start and end time. And Visio always require end time to be greater than the start time. Any suggestion on how I can do this in Visio? You're not going to be able to use the timeline because the code is linked to the system clock (only goes back to 1900). You'll have to use the vanilla shapes that come with visio. Al "Little Black Sheep" <Little Bl...

Export or Print multiple reports from one Access Report by Group
I have a sales report that is grouped by Salesperson. Each salesperson has multiple pages of the report and I need to either print it or export it to PDF as individual reports for each salesperson. Is there a way to export/print the report into seperate reports for each Salesperson? Thanks. I am pretty new to Access, but I have figured out how to get the report in the structure I want it. I just can't get the information out of the program in the format. I can print as one PDF document and then go and cut that up in Adobe, but I wanted to see if Access could do it for me and save ...

Redirect to a page when accessing by specific browser
Hello, Last days, some of users used new version of Chrome browser to access our corporate SharePoint Portal (SP2003) and for some reason this generated a huge HTTP trafic to a web server. One person just left the computer on with Chome open in the evening and the day after I found IIS log size rised to 3GB just within 24hrs, usually we have daily logs with size 50-70MB. As a resolution, I see to block accessing our web server with Chrome browser. Is that possible with IIS6? Can we redirect users to a specific page when they use Chrome to access web server? Thank you. ...

Accessing pivot table's data
I have a pivot table that is linked to data returned by MS Query. I'd like to highlight cells in the data body of the pivot table, based on the values of other fields returned by the query. How do I accomplish this? ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~View and post usenet messages directly from http://www.ExcelForum.com/ ...

Access to customer source?
Can somebody help me with how i get access to customer source? Do i need to go through my partner/provider or do i deal directly with microsoft? HI Gass, Yes you need to contact your parnters to have create your account in customer source you can access it by http://www.microsoft.com/dynamics/default.mspx Regards "Philip Gass" wrote: > Can somebody help me with how i get access to customer source? Do i need to > go through my partner/provider or do i deal directly with microsoft? > > > No, you are not required to have a MS Partner in order to purchase a...

C++ : Is it lots harder than c# and VB
Hi everyone, I learned Java whilst at university and have taught myself c# and VB.net. I think I am ok at it. I was thinking, these languages will probably be bigger in the future so I better get ready for them. But then, I also realised that COM is still quite important and so is C++. So I thought I better just try and have a look at C++ and COM. And now I'm scared. So my question is - why does C++ look so much harder than c#? For example : 1. The methods all have really stupid names that are hard to descern a function from. 2. You need to think about pointers and cleaning up ...

Cannot Access Exchange Mailbox With Outlook 2000
I have a user that cannot access their exchange box with ANY machine running Outlook 2000. When I try, I get the infamous error below: "OUTLOOK.exe has generated errors and will be closed by Windows. You will need to restart the program. An error log is being created." I've tried all of the Micro$oft troubleshooting techniques, but the problem appears to be with the exchange mailbox. However, OWA and later versions of Outlook will open the mailbox just fine (I don't have access to earlier versions). Can someone please shed some light on this? I will cross post this...

Visual C++ to read Strings from Serial Port
Hi. I'm doing a project using Visual C++ to read data from Serial Port. My program needs to do *something* when it receives specific data. For eg, if the program receives "Alarm 1 Zone 4", it will do something. The data received will be variable in length. My questions: 1) Any recommendations for the serial Comm Class for Visual C++? 2) How can i compare the data i receive from serial to the specific messages i'm looking for, eg data types, size of data types, limitations & etc.? Thanks. Any comments are highly appreciated. Leng As far as the serial part goes, it i...

Access 07: How to pull in information
Hi all - I'm pretty much an access/db newbie, so I would love some help and opinions here. Basically, I need to know how to use Access most efficiently (or if I should use it at all!). I work with a client that sends me a daily feed of information in an excel file. Most of the information is text and date based. I do a lot of data entry (adding to) and 'drilling' into the information they send and I need to create reports/exports from this information. That's why I use Access instead of Excel (am I wrong to do that?). Each day I need to: -Append any new records they have adde...

How do I make a column be my default column in Access
I need to make my desricption field my default field. How do I do that? Right not it defaults to my items field. me.controlname.setfocus or in macro GoToControl "controlname" Bonnie http://www.dataplus-svc.com michelle wrote: >I need to make my desricption field my default field. How do I do that? Right >not it defaults to my items field. -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/access/200912/1 Or, if you don't want to use events, simply set your tab order from the form design view. -- Frank H R...

C#.net windows application
Since I am new to c#.net 2008 but I have worked a little with visual basic.net 2005, I have the following questions I would like to ask: 1. When I am looking at a .sln file that I will be maintaining a work, I can see there are lots of static void Main() methods in a file called program.cs throughout the solution in separate folderts. Can you tell me the purpose of this kind of code? Does this instantiate an object, is this a class libary member? 2. When running the C#.net 2008 professional version windows application, how do I know which 'main' method is being called? ...

MFC DLL Calling C# Assembly
I have been trying to get a simple mfc dll I wrote to add to numbers call a C# assembly. Here is a sample of my C++ code in my cpp file. extern "C" _declspec(dllexport) int Calc(int no1,int no2) { //result = no1 + no2; return MangedAdder(no1, no2); } #pragma managed #using <mscorlib.dll> #using <ControllerLibrary.dll> int MangedAdder(int a, int b) { ControllerLibrary::DLLController *t = new ControllerLibrary::DLLController(); return t->AddNumbers(a, b); } All I really need is an extern function in a mfc dll that calls a me...

Outlook Web Access attachment problem
We have a program that will generate a .snp file and then email it to whatever recipient it needs to go to. If they receive the email in Outlook it will allow them to open the file properly with the Snapshot viewer. However, if they go to the same email in OWA and try to save the attachment, it attempts to save it as an .mdb file. Why would OWA ignore the original extension and try to give it a different one? "Joe Giddings" <j_nospam_giddings@thehammocksource.com> wrote in news:jI9gd.11726$ta5.6952@newsread3.news.atl.earthlink.net: > We have a program that will genera...

Type Casting in C and C++
Hello NG As an old style programmer I've been casting values with the C-syntax like: double dVal=3.14; float fVal = (float) dVal; but now I've been told that the C++ syntax should do a better job float fVal = static_cast <float>(dVal); for some reason. Is this true? Will the C++ compiler really generate different (better?) code or is it simply more writing I have to do? Thanx Richie >As an old style programmer I've been casting values with the C-syntax like: > >double dVal=3.14; >float fVal = (float) dVal; > >but now I've been told that the C+...

TSQL replacements for Access Functions
Great article, wish someone had given me this a decade ago! http://www.databasejournal.com/features/msaccess/article.php/3865076/article.htm Thanks for sharing that link. Danny does a good job of summarizing. "a a r o n _ k e m p f" <aaron_kempf@Hotmail.com> wrote in message news:81d76203-063c-4e73-9973-b3d2a893c654@v20g2000prb.googlegroups.com... > Great article, wish someone had given me this a decade ago! > > http://www.databasejournal.com/features/msaccess/article.php/3865076/article.htm > "a a r o n _ k e m p f" <aaron_kempf@Ho...

Accessing a HID Endpoint within a composite device
I have a composite device that has 3 interfaces. Interfaces 1 and 2 are vendor specific and Interface 3 is a HID endpoint that Windows recognizes and load the HID class driver for. To get my driver to work, I need to install it for the composite device, which then hides all the end points and makes the HID interface invisible to Windows. What I'd like to know is : Is it possible for my driver to be installed on the composite device, control 2 of the 3 interfaces and expose the 3rd (HID end point) to Windows' HID driver? If it is, how do I do this? I have only limited contr...